The Frenchman took advantage of a great leadout by teammate Christophe Laporte, who finished fourth, to canter across the line and into the race lead.
Having crested the climb that came around 15km from the finish line, Dimension Data‘s Kanstantin Siutsou tried his luck on his own off the front of the group.
But the descent down into the city of Cordoba allowed a group of reduced numbers to for, with around 35 riders contesting the final few kilometres.
Ben Swift had Gianni Moscon for company, but with general classification hope Wout Poels also with them the Italian was likely working to keep the Dutchman safe as well as trying to set Swift up for the sprint.
As it was, Bouhanni got himself in a better position on the narrow finishing straight and easily sped to the line.
Vuelta a Andalucia Ruta Ciclista del Sol stage two, Palomares del Rio – Cordoba (186.3km)
1. Nacer Bouhanni (Fra) Cofidis, 4-39-33
2. Fabio Felline (Ita) Trek-Segafredo, st
3. Ben Swift (GBr) Team Sky, st
4. Christophe Laporte (Fra) Cofidis, st
5. Raymond Kreder (Ned) Roompot-Oranje Peloton, st
6. Juan Jose Lobato (Esp) Movistar, st
7. Tosh Van der Sande (Bel) Lotto-Soudal, st
8. Keil Reijnen (USA) Trek-Segafredo, st
9. Enrico Battaglin (Ita) LottoNL-Jumbo, st
10. Matteo Busato (Ita) Southeast-Venezueala, st
Overall standings after stage two
1. Nacer Bouhanni (Fra) Cofidis,
2. Juan Jose Lobato (Esp) Movistar
3. Raymond Kreder (Ned) Roompot-Oranje Peloton
4. Ben Swift (GBr) Team Sky
5. Tosh Van der Sande (Bel) Lotto-Soudal
6. Reto Hollenstein (Swi) IAM Cycling
7. Keil Reijnen (USA) Trek-Segafredo
8. Daniele Bennati (Ita) Tinkoff
9. Enrique Sanz (Esp) Southeast-Venezueala
10. Enrico Battaglin (Ita) LottoNL-Jumbo