Pa Konate's fine work on the left created an opening for Rosenberg to fire home in the 17th minute to the delight of the home crowd. It was Malmö's first goal of the group stage, following two consecutive 2-0 defeats to Paris Saint-Germain and Real Madrid, and puts them ahead of the Ukrainians in the battle for third spot and a place in the Europa League.
"I must commend the boys on a fantastic job," Malmö coach Åge Hareide told AFP.
Shakhtar had numerous chances to equalize in the first-half. Darijo Srna, Alex Teixeira and Marlos all had shots blocked by goalkeeper Johan Wiland.
Malmö were the better team after the break with Shakhtar goalkeeper Andriy Pyatov pulling off a string of fine saves. He was at his best to deny Nikola Djurdjic from the penalty spot in the 56th minute, which ensured a nervy end for the Swedish side as the visitors pressed for an equaliser.
"They were stronger than us. On top of that, their supporters were fabulous," long-serving Shakhtar coach Mircea Lucescu said after his team's third straight defeat.
Malmö, who play the return match against Shakhtar in a fortnight's time, lie third in Group A with three points, four less than PSG and Madrid, who drew 0-0 in the other group game. The match in Paris had been billed as a shoot-out between Zlatan Ibrahimović and Cristiano Ronaldo but both star forwards were not at their best. Zlatan has never scored against Real Madrid in the Champions League.