The first time Olympian came off the bend in fourth and quickly worked her way into the bronze medal position before crossing the line in 49.85 seconds.
It took a dramatic dive by Miller at the finish line to prevent Felix from capturing a record fifth Olympic gold medal.
Miller clocked 49.44 seconds, running in lane 7, to narrowly hold off Felix, who finished in 49.51.
Felix won the 400 at the world championships last year and was planning to run the 200- and 400-metre double in Rio, but was hampered by an ankle injury at the U.S. trials and didn’t make the team for the 200. She won the 200 in London four years ago.
Felix now has seven Olympic medals, including three silvers. She could still run both the 4×100 and the 4×400 relays in Rio.
The 30-year-old American entered the games as one of six women with four Olympic gold medals in track and field.
The second Jamaican in the finals, Stephenie Ann McPherson, finsihed sixth in a time of 50.97.
Jamaica has now won four medals (two gold and two bronze) in Rio.
Global sprint king Usain Bolt and Elaine Thompson accounted for the gold medals, while the other bronze came from two-time Olympic champion Shelly-Ann Fraser-Pryce.
See the results of the finals below:
Gold: Shaunae Miller (Bahamas), 49.44s
Silver: Allyson Felix (United States), 49.51s
Bronze: Shericka Jackson (Jamaica), 49.85s
4: Natasha Hastings (United States), 50.34s
5: Phyllis Francis (United States), 50.41s
6: Stephenie Ann McPherson (Jamaica), 50.97s
7: Olha Zemlyak (Ukraine), 51.24s
8: Libania Grenot (Italy), 51.25s
Source: Loop Jamaica