WASHINGTON—President Trump is preparing to issue an executive order Wednesday effectively banning transgender girls and women from participating in female sports events in schools and colleges, fulfilling a promise that fueled his campaign for the White House.

Trump will sign an order titled “Keeping Men Out of Women’s Sports” Wednesday afternoon, said people familiar with the matter, including a White House official and a member of Congress.

Rep. Nancy Mace (R., S.C.) said Tuesday in a press release she plans to join the president as he issues the order. “This executive order restores fairness, upholds Title IX’s original intent, and defends the rights of female athletes who have worked their whole lives to compete at the highest levels,” Mace said in her press release, which also said that the signing coincides with the 39th annual National Girls and Women in Sports Day.

It wasn’t immediately clear exactly what the contents of the order would entail, but one option is for the president to direct the Education Department to interpret federal Title IX rules as barring the participation of transgender girls and women in female sports categories. People on different sides of the issue have anticipated that the department would then base its policies and future regulations around this interpretation, issuing guidance to schools to act accordingly—and investigating alleged violations.

The scope of the order stands to instantly affect any educational institution that receives federal funding—which includes almost every college in the U.S., as well as the majority of K-12 schools. The Title IX provision in the Education Amendments Act of 1972 prohibits sex-based discrimination in educational activities, though the meaning of that has been hotly contested for decades, mostly recently focusing on its application to transgender students.

In the face of such an order likely affecting all but a handful of the National Collegiate Athletic Association’s 1,100 member schools, the NCAA has indicated that it will move rapidly to change its rules.

“We’re a national governing body and we follow federal law,” NCAA President Charlie Baker told Republican senators in a series of contentious exchanges over the issue during a hearing in December. “Clarity on this issue at the federal level would be very helpful.”

The participation of a handful of female transgender athletes in women’s sports events was a favorite issue of Trump’s on his road to the White House, and a topic that several winning GOP Senate candidates focused on as well. Trump also incorporated a controversy at the 2024 Paris Olympics over the eligibility of a female Algerian boxer , who isn’t transgender.

An executive order is one of the fastest ways that Trump and congressional Republicans can take action on the sports issue—building on other early executive orders , including one that stated that the federal government will recognize only “two sexes, male and female” and that “these sexes are not changeable.”

Ahead of Trump’s inauguration, the Republican-led House passed a bill designed to force schools and colleges into prohibiting transgender girls and women from competing in female sports categories. But it isn’t clear that the bill can secure seven Democrats’ votes in the Senate to avoid a filibuster.

There are 27 states that have sweeping restrictions on the participation of transgender girls and women in school sports. There are policies mandating their inclusion in another 14 states, which are estimated by transgender-rights advocates to have a larger population of transgender students.

In several instances, courts have sided with transgender female plaintiffs challenging categorical bans on sports participation, primarily stemming from statewide laws, as overly broad. Several of those plaintiffs argued that Title IX mandates their inclusion—not their exclusion—and pointed to the Equal Protection Clause.

However, some judges and courts have signaled that they could see restricted eligibility for women’s sports as consistent with Title IX.

Write to Natalie Andrews at natalie.andrews@wsj.com and Louise Radnofsky at louise.radnofsky@wsj.com