The Red Bull junior came out on top in a frantic scrap for the lead in the opening laps, as he, race-one winner Stoffel Vandoorne and Magnussen all traded places at the front.
Vandoorne snatched the lead from polesitter da Costa at the start, but da Costa grabbed it back with a pass at the first chicane on lap two.
Fortec driver Vandoorne had skipped the second part of the chicane after trying to defend on the brakes, and he fell behind da Costa and Magnussen on the exit.
Da Costa then fended off an attack from Magnussen into the second chicane, only to give the Dane a chance by running wide on the exit of Lesmo 2.
Magnussen waited until the Parabolica to make his move, swooping around the outside to take the lead.
But his time at the front was short-lived, as da Costa passed him on the outside into Turn 1.
From then on the top two pulled away from Vandoorne and the chasing pack, with Magnussen never letting da Costa's lead above 1.2 seconds.
But the leader didn't put a wheel wrong under all that pressure, while Magnussen had to back off on the penultimate lap and take second after his sidepod started to come loose.
Vandoorne took a lonely third, while Arthur Pic put in a charging drive from 16th on the grid to take fourth ahead of Nico Muller.
Oliver Webb was on course for sixth place, but he toured across the line in ninth with damage to the left rear of his car.