Activists say the "Mississippi Fairness Act" is the first law targeting transgender people to pass in 2021.
The bill argues that boys and girls have "inherently different athletic capabilities". It is expected to face legal challenges.
It comes as a swath of Republican states push back against pro-LGBT measures from the Biden administration.
What does the law say?
The law requires public high schools and institutions of higher education to "designate its athletic teams or sports according to biological sex".
Coming into effect in July, it also calls for protecting schools that maintain separate sports teams from complaint or investigation.
Supporters of the bill had argued that transgender women have an unfair advantage over those born female, because they have "categorically different strength, speed and endurance".
It cites an article written by a trio of women's sports stars - including tennis champion Martina Navratilova - that said it would be "a denial of science" to ignore that those born male can "beat the best girls and women in head-to-head competition".
Trans athletes face 'huge' equality fight
Ms Navratilova has since established a group that she says will seek a "science-based, ethical approach" to "establish a middle ground that both protects girls' and women's sport and accommodates transgender athletes". She has also proposed a special provision for elite sports.
MPs from across the political spectrum called during a Westminster debate for the practice to be made illegal.
Equalities minister Kemi Badenoch said the government was "committed" to "ending" it, and took the issue "very seriously".
But equality campaigners and some MPs said targeted action was needed.
"Conversion therapy" refers to any form of treatment or psychotherapy which aims to change a person's sexual orientation or gender identity.
The practice is already outlawed in Switzerland and parts of Australia, Canada and the US.