Rap legend Tupac Shakur's prison letter was released by TMZ on Wednesday and it revealed that his relationship with Madonna was deeper than anyone had known.

The pop icon revealed in 2015 that she dated Tupac three years before his death in 1995.

"One time I was mad at [David Letterman] when I said the f-word a lot, but the rest of the time was good," Madonna said in an interview with Howard Stern. "I was in a weird mood that day. I was dating Tupac Shakur at the time, and he had got me all riled up about life in general. So, when I went on the show I was feeling very gangsta."

However, Tupac poured his heart out to Madonna explaining why he had to end all ties with her. He proceeded to say that he left her because of her race.

"Can u understand that? For you to be seen with a black man wouldn't in any way jeopardize your career. If anything it would make you seem that much more open & exciting," he continued. "But for me at least in my previous perception, I felt due to my 'image' I would be letting down half of the people who made me what I thought I was. I never meant to hurt you."

The letter also mentioned how Tupac was hurt that Madonna mentioned in an interview that she was moving on to basketball players and rappers.

"Those words cut me deep seeing how I had never known you to be with any rappers besides myself. It was at this moment out of hurt & a natural instinct to strike back and defend my heart & ego that I said a lot of things," he said.

The heartfelt letter ended with Tupac warning Madonna and requesting for her to visit him in prison.

"Please be careful Madonna. Everyone is not as honorable as they seem there are those whose hearts bleed with envy & evil. They would not hesitate to do you harm!" he continued. "I don't know how you feel about visiting me but if you could find it in your heart I would love to speak face to face with you."