U.S. District Judge Virginia Phillips ordered the military "immediately to suspend and discontinue any investigation, or discharge, separation, or other proceeding, that may have been commenced under the 'Don't Ask, Don't Tell' (policy)," CNN reported.
Under the policy, the military tolerates gay soldiers as long as they aren't openly homosexual.
Last month, in a suit brought against the Pentagon by a gay and lesbian advocacy group, the Log Cabin Republicans, Phillips declared the policy violated the Fifth Amendment's ban on self-incrimination, but had delayed the injunction until Tuesday, CNN said.
Servicemembers United, the nation's largest organization of gay and lesbian troops, hailed the injunction, The Miami Herald reported.
"This order from Judge Phillips is another historic and courageous step in the right direction, a step that Congress has been noticeably slow in taking," said Alexander Nicholson, executive director of Servicemembers United, which was a joint plaintiff in the suit along with the Log Cabin Republicans. "While this is certainly news to be celebrated, we would also advise caution in advance of a potential stay (from the federal appeals court)."
The government was expected to appeal.