U.S. District Judge Charles Clevert issued the order Wednesday. He ruled the law was unconstitutional and cannot be enforced.
The American Civil Liberties Union of Wisconsin and gay-rights group Lambda Legal say the law was the only one of its kind in the nation that denied such medical care to transgender inmates.
A spokesman for Wisconsin Attorney General J.B. Van Hollen says the state is considering an appeal.