Tyler Perry received his first honorary doctorate and delivered an inspirational speech at Tuskegee University's graduation over the weekend.

MORE: Tyler Perry's estate sells for $17.5 million .. Video tour of Tyler Perry's home

"I was the commencement speaker today for the 2016 graduating class of Tuskegee University," Tyler Perry posted with this image. "Thank you for having me and giving me my first honorary doctorate. Thank you President Johnson, Chairman Page, faculty, staff and students. Congrats to the class of 2016."

Credit: Jennifer Brett

icon to expand image

Credit: Jennifer Brett

MORE: Tyler Perry posts terrifying photo from movie set .. Watch Tyler Perry get into character

He shared his personal story as a way of inspiring the new graduates, starting from 1991, when he had just written his first play. His goal was to clear enough money to support his mother, then move on. It didn't exactly happen that way.

"I had just moved to Atlanta to try to launch this play, so I went to work," he said. "I managed to save $12,000 and I put the show up working in used car, as a bill collector (proceeds from a tax return). I thought 1,200 people would show up that weekend but only 30 showed up. My car payment, rent, everything was tied up in it so I ended up homeless with no money and nothing to my name."

He wasn't dissuaded.

"From 1992, to 93, to 94, I was doing one show a year," he said. "I kept on doing the play. Every year it would fail, until 1998, the seventh year of me trying. I was about to give up and walk away."

His mother suggested he try to get a job at the phone company, with steady pay and good benefits. Then he started hearing from audience members who shared how his words moved them.

"My life shifted after that," he said. "My intention became, how do I serve other people? How do I lift other people?

PAST COVERAGE: Tyler Perry, Usher in DC for Kennedy Center Awards ..  Tyler Perry posts stunning photo of his buff beach body

Tyler Perry's White House selfie

Credit: Jennifer Brett

icon to expand image

Credit: Jennifer Brett

The event was the first time Perry received an honorary doctorate.

"It fills my heart with joy to be here," Perry said. "Your light is shining so bright today."

"Being my first commencement speech, I feel pressure to say something that will inspire," he said. "I did not go to college. It wasn't that I didn't want to go. I was going through a very difficult time in my life. I had also had a front-row seat to watch my mother struggle to put my older sister through college. I didn't want to be that kind of a burden."

Perry also said he was smart but wasn't a great student.

"You know how hard-headed teenagers can be," he said. True, he hasn't ever had to put high school algebra or history lessons into practice, but a formal education has tangible value nonetheless, he said.

"This college degree that you have, I envy you," he said. "If I could get back half of the time and the money that I wasted because of what I didn't know, I could have paid for everybody's education in this entire school."

"It was what I didn't know that made it difficult for me running my business in the beginning," he said. "Now, don't feel sorry for me. I'm doing alright!"

He aligned experiences of his formative years with the importance of preparing for the future.

"When I was growing up, my father was a carpenter. He would take me to work with him. The part that I hated the most was putting in the foundation. It was painstaking digging these holes," he said. "After it was done, nobody ever saw it. Nobody ever cared about the foundation."

But a proper foundation supports anything it's designed to hold.

"That's what you've been doing here," he said. "I need you to ask yourself: How much can my foundation hold?"

Here's the entire speech: