Nekounam converted a penalty kick in the third minute of the match and Shojaei's powerful volley in the 37th doubled the lead.
Carlos Aranda scored for Osasuna in the 53rd minute to seal a one-sided victory for the Pamplona-based club.
The three points allow Osasuna to climb from the drop zone to the safety of mid-table, while Malaga is now in danger at the foot of the standings after their fifth loss in eight games.
The Iranian midfielders have been key components of Osasuna for the past three years.