The letter dated January 1995 was written to Madonna by Tupac while he was in prison for sexual assault.
The music star filed a request in New York Supreme Court for a temporary restraining order against New York auction house "Gotta Have It Collectibles" to halt the sale, due to start on Wednesday, July 19, 2017.
Madonna will also be blocking the auction of her "personally worn panties", and a note in which she called Whitney Houston and Sharon Stone "horribly mediocre".
She said in court documents that she only found out about the auction in the press and accused her former friend and art consultant, Darlene Lutz, of betraying her "in an outrageous effort to obtain my possessions without my knowledge or consent."
In response, a representative for the auction house and Lutz said Madonna's effort to stop the sale was "a completely baseless and meritless action," and they would challenge her claims in court.
In the letter dated January 1995 and written to Madonna by Tupac while he was in prison for sexual assault, the rapper claims he ended their romance because he felt that dating a white woman could jeopardise his career.