Sebastian Vettel finished second for Ferrari with Force India's Sergio Perez third as Rosberg extended his championship lead to 24 points.
Kimi Raikkonen finished fourth after letting his faster team-mate Vettel through.
European Grand Prix
Infiniti Engineering European winner revealed
While Rosberg was never troubled en route to his 19th career GP win from pole position, Hamilton scrambled up the field from 10th on the grid and was bedevilled by technical problems.
At one point, Hamilton lost power as his car was in the wrong mode, but the team could not tell him the issue due to radio restrictions.
Mercedes chief Niki Lauda confirmed both the team's drivers experienced the same issue, but Rosberg "fixed it quicker".
Ferrari also fell foul of the restrictions, as the team refused to answer a question from Kimi Raikkonen about a techincal setting.
Lewis Hamilton in action in the European Grand Prix
Image credit: AFP
European Grand Prix result
1-Nico Rosberg (Mercedes)
2-Sebastian Vettel (Ferrari)
3-Sergio Perez (Force India)
4-Kimi Raikkonen (Ferrari)
5-Lewis Hamilton (Mercedes)
6-Valtteri Bottas (Williams)
7-Daniel Riccardo (Red Bull)
8-Max Verstappen (Red Bull)
9-Nico Hulkenberg (Force India)
10-Felipe Massa (Williams)
Driver's championship standings
Nico Rosberg - 141
Lewis Hamilton - 117
Sebastian Vettel - 96
Kimi Raikkonen - 81
Daniel Riccardo - 78
Nico Rosberg in Baku
Image credit: Imago
Aston Martin want Vettel to stay and expect answer 'imminently'
Verstappen's collision with Hamilton a 'tactical foul' - Wolff