Will Smith is opening up about his feelings for a former co-star.

In 1993, the actor starred in "Six Degrees of Separation" as Paul Poitier, a mysterious young man who intrudes upon the lives of an affluent couple played by Donald Sutherland and Stockard Channing.

At the time of filming, Smith was newly married to his first wife, Sheree Zampino, the mother of his son Trey.

In an excerpt of his upcoming memoir "Will," shared with People magazine, the 53-year-old star recalled when he "fell in love" with Channing, following in the footsteps of his character.

WILL SMITH SPEAKS OUT ABOUT THE 'DEFUND THE POLICE' MOVEMENT, SAYS IT 'DOESN'T GET IT DONE'

"Sheree and I were in the first few months of our marriage with a brand-new baby and for Sheree, I can imagine that this experience was unsettling to say the least," he said of staying in character even when off the movie set.

"She'd married a guy named Will Smith and now she was living with a guy named Paul Poitier," he continued. "And to make matters worse, during shooting I fell in love with Stockard Channing."

Smith said that when filming on the New York-set flick wrapped, he and his wife took their son back to Los Angeles.

WILL SMITH TALKS JADA PINKETT SMITH'S 'ENTANGLEMENT' OUTSIDE THEIR MARRIAGE, REVEALS HE HAD RELATIONSHIPS TOO

"Our marriage was off to a rocky start. I found myself desperately yearning to see and speak to Stockard," he explained.

Reps for the actress did not immediately respond to Fox News' request for comment.

Will Smith said that he ‘fell in love with’ Stockard Channing during the filming of 'Six Degrees of Separation.'

Will Smith said that he ‘fell in love with’ Stockard Channing during the filming of 'Six Degrees of Separation.' (Getty Images)

The "Will" excerpt isn't the first time he's addressed his connection to Channing, a veteran stage and screen actress perhaps best known for playing Rizzo in the film adaptation of "Grease."

"With ‘Six Degrees of Separation,’ I got a taste early of the dangers of going too far for a character," he told Esquire in 2015. "My character was in love with Stockard Channing's character. And I actually fell in love with Stockard Channing."

WILL SMITH SHARES A MORE GLAMOROUS SHIRTLESS PHOTO, PROMISES TO GET IN THE 'BEST SHAPE' OF HIS LIFE

"I was like, 'Oh no! What have I done?'" he recalled. "That was my last experience with Method acting, where you're reprogramming your mind. You're actually playing around with your psychology. You teach yourself to like things and to dislike things."

He added that method acting – fully immersing yourself in a character, physically and otherwise – can be "really dangerous."

Actor Will Smith and wife Sheree Smith attend the ‘Six Degrees of Separation’ Los Angeles Premiere on December 8, 1993 at the Los Angeles County Museum of Art in Los Angeles, California.

Actor Will Smith and wife Sheree Smith attend the ‘Six Degrees of Separation’ Los Angeles Premiere on December 8, 1993 at the Los Angeles County Museum of Art in Los Angeles, California. (Photo by Ron Galella, Ltd./Ron Galella Collection via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

"But once I had that experience, I was like, No more Method acting," he said. "I was spending—for 'Six Degrees,' I wanted to perform well so badly that I was spending six and seven and eight days in character before shooting, and you have to be careful with that."

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

After the Esquire story was published, Channing, now 77, told Page Six that she was "flattered."

"That’s a wonderful thing … I adored him from the first time I laid eyes on him because I thought he was genuinely sweet," she said. "I felt very protective of him, because it was his first big job. It’s amazing for me to hear that he felt that way, I’m delighted."