Mr. Weaver graduated from basic training in July and shipped off to Naval Air Station Pensacola, in Florida. But the abuse he had seen in boot camp caught up with him, he said. Bad dreams kept him from sleeping; he lost motivation to train. A lifelong runner, he lacked the energy to go for a jog on the beach, he said.

“Everyone was so proud of me, but I just saw the Marines as one big lie that I was now a part of,” he said.

After he was hospitalized for being suicidal in September, he was put on medication and began seeing a base psychologist.

In November Mr. Weaver told his commander he was not well enough to train. The psychologist treating him wrote two letters to his commander, Maj. Jenny A. Colegate, recommending a general discharge for medical reasons.

But Major Colegate, who in a previous assignment had trained recruits at Parris Island, ordered Mr. Weaver to return to duty. When he refused, citing the psychologist’s advice, the Marines discharged him for a “pattern of misconduct.”

Maj. Clark Carpenter, a Marine Corps spokesman, said that Major Colegate was not available for comment but that the discharge was technically correct because Mr. Weaver had refused to train. He added, though, that not all information had been included in the recommendation for a discharge that went for final approval, and that it was likely that if it had been included, Mr. Weaver would not have received the administrative discharge.

For months Mr. Weaver has been doing odd jobs in his neighborhood. The other-than-honorable discharge on his record has become a badge of shame and makes it hard to find work, he said.

He said he feels as if his future was taken from him.

“All I ever wanted to be was a Marine, and I was a good Marine,” he said. “But now I’m being punished for a bunch of stupid stuff that isn’t supposed to happen.”