Maitland Ward went from being a sitcom star to an adult film star.

From 1998 until 2000, the actress played Rachel McGuire in the last two seasons of ABC’s "Boy Meets World." After her time on the series, Ward later broke into the adult film industry. She has detailed her surprising career path in a memoir published on Sept. 6 titled "Rated X: How Porn Liberated Me from Hollywood."

"I think it’s an empowering story for women and everyone really," Ward, 45, told Fox News Digital. "It’s about living your truth and not listening to what everyone is telling you to do. For so long, Hollywood was telling me that I could only be a certain way. The industry wanted to keep me in some box. I reached a point where I just wanted to do my own thing. I’m now my authentic self. There are always going to be people who will try to pigeonhole you, especially as a woman. For me to break out has been so liberating. I think that’s true for anyone in any industry. My story just happens to be a little more scandalous."

Maitland Ward

Maitland Ward is embracing her "authentic self" in the adult film industry. (Gabe Ginsberg/WireImage)

The California native said that as a child she dreamed of becoming an actress. Her first role was that of Jessica Forrester on "The Bold and the Beautiful" from 1994 until 1996. After the soap opera, she found herself on the set of "Boy Meets World," a wholesome coming-of-age comedy created by Michael Jacobs. Ward joined a close-knit cast as the new girl.

HOW TO AVOID 'TINDER SWINDLERS': ‘BOY MEETS WORLD' STAR-TURNED-ADULT ACTRESS MAITLAND WARD ON 'RED FLAGS'

"I was received very well, they were very nice to me," Ward explained. "It was an odd thing to walk into a set that had been such a well-oiled machine and where they had grown up on the show. Everyone was established and knew how to work with each other. I was coming in for the college years, and I was nervous about that. But I was accepted… and I had a great time on the show."

In chapter six of her book, Ward alleged that she was asked to try on lingerie for producers, "primarily men," in the office "more than once" as her character's personal style evolved. Ward stressed she was never sexually assaulted but the overall experience made her "uncomfortable."

Maitland Ward Boy Meets World

Maitland Ward played Rachel McGuire on the last two seasons of the ABC sitcom "Boy Meets World" from 1998 to 2000. (ABC Photo Archives/Disney General Entertainment Content via Getty Images)

"Yes, it was uncomfortable and odd, and I wasn’t sure why I needed to be doing this," she told Fox News Digital. "I thought it was my job to behave and be a professional. Or whatever I thought that was at the time. But it was very uncomfortable and made me feel exposed and gawked at. Even Michael commented that he was so embarrassed about this because I’m so much like a daughter to him [that it] felt weird. I never understood why we didn’t just take pictures of everything in wardrobe and choose from there. Why did I have to put on a show?"

"My confidence was low with my body." Ward said. "I was young, impressionable and thought this is what you do. It would never happen today because somebody would get called out on it. And let me just say, I’m in porn, and I’ve never had to walk into a producer’s office or whatever and try on the lingerie for a shoot."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

An attorney for Jacobs didn’t immediately respond to Fox News Digital’s request for comment.

Maitland Ward Rated X

Maitland Ward has written a memoir about finding fame in the adult film industry. (Atria Books)

Ward said that she noticed her character, who lived with roommates Eric Matthews (Will Friedle) and Jack Hunter (Matthew Lawrence), became popular among male audiences.

"I remember one time some guys in the studio audience would whistle at me," she recalled. "I remember thinking, ‘Oh my God, they actually see me as sexy.’ Because I didn’t find myself sexy. I thought I was pretending to be kind of sexy for the show, you know, with my little dances. But I still wasn’t confident in my body. I remember these four guys were like, ‘Rachel, we love you. You’re so hot.’ I just thought that was crazy to me."

After "Boy Meets World," she appeared in 2004’s "White Chicks." But she eventually found herself being typecast.

‘BOY MEETS WORLD’ ACTRESS MAITLAND WARD SAYS WILL FRIEDLE IS ‘SUPPORTIVE’ OF HER PORN CAREER BUT ‘WON’T WATCH’

Maitland Ward red carpet

Maitland Ward said she was tired of being pigeonholed in Hollywood. (Gregg DeGuire/WireImage)

"I knew Hollywood wasn’t for me, but I kept wanting to hang on," said Ward. "I kept trying to think of ways to reinvent myself. I’m not one to give up easily. But my self-esteem was down. You’re hired for being a certain way, for looking a certain way. But if you stay the same, you lose success. The thing that makes you famous is the thing that will prevent you from ever getting hired for anything else."

"Hollywood is a machine that builds you up but then tears you down," she continued. "I think a lot of actors struggle with that, especially if you were on a popular prime-time show. It’s hard to break out of the stereotype. I had wanted to do so many things, acting wise. I wanted to play more dramatic roles, more emotional roles, even more evil roles. I just wanted to play something different. And yet I wasn’t even allowed to audition for it. I wasn’t seen as anything different. And it became disheartening."

Ward said she studied screenwriting at UCLA in hopes of forging a different career path. But then she started posting photos of herself either in "cute bikinis" or cosplay on social media. Her following immediately multiplied.

Maitland Ward cosplay

Maitland Ward is dressed as Poison Ivy from "Batman" at Comic Con Revolution in Ontario, California, on May 18, 2019. (Albert L. Ortega/Getty Images)

"My photos would sometimes get taken down because they were too sexy," said Ward. "Some fans reached out and said, ‘Why don’t you sell content?’ I didn’t know exactly what it meant until I learned you can sell your pictures and do whatever you want without restriction. I started a Patreon and in a week I had thousands of subscribers… and I wanted to explore my sexuality."

‘BOY MEETS WORLD’ STAR-TURNED-PORN ACTRESS MAITLAND WARD PENNING TELL-ALL ABOUT LIFE AFTER DISNEY

Ward started making adult films after she married her husband, Terry Baxter, in 2006. She said her spouse has been "super supportive."

Maitland Ward adult film industry

Maitland Ward is shown attending the 2020 Adult Video News Awards at The Joint inside Hard Rock Hotel and Casino in Las Vegas, Nevada, on Jan. 25, 2020. (Ethan Miller/Getty Images)

Ward insisted she isn’t fazed by any criticism for her decision to pursue the adult film industry.

"I have more fame, more money and more acting opportunities than I ever had," she said. "I get to create roles. I get lengthy, twisted dialogue. I get to write scripts. I get to do all the things that I wanted to do. I even have more respect now for doing exactly what I want to do unapologetically. How can you shame someone who is not ashamed? And women approach me all the time saying that I’ve empowered them to feel more comfortable in their sexuality."

ADULT FILM STAR MAITLAND WARD SHARES PHOTO FROM 'BOY MEETS WORLD' DAYS FOR SERIES FINALE 20TH ANNIVERSARY

As for her former "Boy Meets World" castmates, Ward said she hasn’t received any negative feedback.

Maitland Ward Rachel Boy Meets World

From left: Matthew Lawrence, Maitland Ward and Will Friedle in "Boy Meets World." Ward told Fox News Digital that Friedle, in particular, has been supportive of her adult film career. (ABC Photo Archives/Disney General Entertainment Content via Getty Images)

"Wilfred [Friedle] has been really sweet to me," she said. "He called me and said he was proud of me. He said he will never watch anything that I do, but he supports me. I’ve been best friends with Trina [McGee] for years, and she supports me. I just don’t see how anyone can denounce me for being happy in life."

Today, Ward said she has never felt more comfortable in her skin. 

"We are just people making a living to support our lives and families," she insisted. "And out of all places, Hollywood shouldn’t be passing judgment."