The forward struck a late winner at the Rosaleda, just moments after the home side had been reduced to 10 men following the dismissal of Francisco PortilloAthletic Bilbao to a come-from-behind 2-1 win at Malaga on Monday.
The forward struck late on, just moments after the hosts had been reduced to 10 men at the Estadio La Rosaleda. Juanmi had given Malaga a 38th-minute lead but his opener was cancelled out by Mikel San Jose in the second half.
Bilbao moved six points clear in fifth in La Liga after the victory, while Malaga sit 14th and just a point above the relegation zone.
Bernd Schuster's Malaga took the lead seven minutes before half-time thanks to Juanmi's smart header. A cross-field pass to the right saw Marcos Angeleri centre a header from the right and Juanmi got in front of his marker to beat Gorka Iraizoz.
Ernesto Valverde's side levelled with 21 minutes remaining thanks to San Jose. A Markel Susaeta corner led to the defender meeting the cross with his head, with the effort sneaking in at the back post.
Francisco Portillo was sent off for Malaga in the 83rd minute, picking up his second yellow card in an eight-minute period. And Bilbao took advantage just two minutes later as Muniain sent the group of travelling fans home happy.
Ander Herrera was freed down the right and crossed for Muniain, whose initial effort was wonderfully saved by Wilfredo Caballero but he tapped in the rebound.