WASHINGTON — Hunter Biden, the younger son of Vice President Joseph R. Biden Jr., failed a drug test and was discharged this year from the Navy Reserve, people familiar with the matter said on Thursday.

Mr. Biden, 44, tested positive for cocaine, those people said.

In a statement provided by his lawyer, Thomas M. Gallagher, Mr. Biden said that he was “embarrassed that my actions led to my administrative discharge.” He added that he respected the Navy’s decision.

Mr. Biden was commissioned as an ensign on May 7, 2013, and assigned to a public affairs reserve unit in Norfolk, Va.

He called it “the honor of my life to serve in the U.S. Navy,” adding “I deeply regret” the actions that led to being discharged. “With the love and support of my family, I’m moving forward,” he said in the statement.