The Pentagon is moving to allow transgender people to serve openly in the military by early next year and end an “outdated” regulation that harms the armed forces, Defense Secretary Ashton B. Carter said on Monday.

Pentagon officials are to spend the coming months working out the administrative and legal changes needed to remove one of the final barriers to all Americans serving in the military.

If realized, the plan would end what is seen as one of the last discriminatory rules about who can enlist or be commissioned in the American military. It would also be a tacit recognition that thousands of transgender people are already in uniform.

Mr. Carter acknowledged as much in a statement announcing the plan. “We have transgender soldiers, sailors, airmen and Marines — real, patriotic Americans — who I know are being hurt by an outdated, confusing, inconsistent approach that’s contrary to our value of service and individual merit,” he said. “The Defense Department’s current regulations regarding transgender service members are outdated and are causing uncertainty that distracts commanders from our core missions.”