WASHINGTON—A senior student-loan official in the Trump administration said he would resign Thursday and endorse canceling most of the nation’s outstanding student debt, calling the student-loan system “fundamentally broken.”

A. Wayne Johnson was appointed in 2017 by Education Secretary Betsy DeVos as chief operating officer of the Office of Federal Student Aid, overseeing the $1.5 trillion student-loan portfolio. After seven months, he moved into a different role as chief strategy and transformation officer, leading a revamp of how the agency deals with borrowers and the companies that service the debt.

Mr. Johnson said repayment trends suggest much of the debt will likely never be repaid, and he is calling for moving toward a system that gets the government out of student lending.

“We run through the process of putting this debt burden on somebody…but it rides on their credit files—it rides on their back—for decades,” he said, adding, “The time has come for us to end and stop the insanity.”

Mr. Johnson said he arrived at his position to cancel student debt after he joined the administration and had a firsthand look at problems, including the high level of defaults and the difficulties of administering a program to erase loans for public-sector workers.