The federal constitutional court based in this southwestern city said the centre-left government of then chancellor Gerhard Schroeder had violated the country's Basic Law by supplying pilots without consulting parliament.
The ruling upheld a five-year-old complaint by the liberal opposition Free Democrats, who had tried and failed to stop the deployment in March 2003.
NATO dispatched AWACS surveillance aircraft to Turkey as part of an agreement to protect the country, a member of the alliance, against any attack by Iraq during the US-led invasion.
Berlin allowed German pilots to man some of the aircraft without putting the issue to a vote in the Bundestag, the lower house of parliament.
The government at the time, comprised of Social Democrats and Greens, fiercely opposed the war on Iraq and refused to take any part, but critics said the crews' flights on the AWACS were tantamount to joining the conflict.
The constitutional court said Wednesday that parliament must have a say in such decisions if it is likely that German soldiers will be drawn into combat as part of a mission.
"It is important that the responsibility for the deployment of armed troops remains in the hands of the representative body of the people," the parliament, the judges said in the ruling.
The decision is unlikely to have any legal consequences for Schroeder or other members of his government but will influence the military policy-making of future administrations.
The current government of Chancellor Angela Merkel, a "grand coalition" of her conservative Christian Union and the Social Democrats, welcomed the ruling.
"The decision sets clear standards and establishes a secure legal framework," government spokesman Ulrich Wilhelm told reporters, adding that the administration would now have to review whether any current deployments violated the guidelines set.
The German military currently has parliamentary mandates for missions around the world including deployments in Afghanistan, Bosnia, Kosovo and the Horn of Africa.