"Dirty Diana" is a rock-inflected pop composition written by Michael Jackson, with origins dating to November 1983 when it was first recorded for The Jacksons' planned Victory album. After being rejected from that project, the song was revisited through several demo sessions before being finalized on June 27, 1987, at Westlake Recording Studios with producer Quincy Jones for inclusion on the Bad album on Epic Records. The composition centers on a narrative vignette inspired by groupie culture surrounding touring musicians, a thematic companion to Jackson's earlier "Billie Jean" in its exploration of fame and manipulation. Set in a minor key, the piece combines Jackson's characteristically precise, percussive pop grooves with hard rock elements, building tension through a verse-pre-chorus-chorus structure that relies on rhythmic intensity and repetition rather than harmonic complexity. The arrangement is guitar-driven, with a prominent electric guitar solo serving as the track's defining instrumental moment. On the album recording, Steve Stevens, known for his work with Billy Idol, delivers a pyrotechnic guitar performance that anchors the song's rock identity. This approach followed the template Jackson established with "Beat It," enlisting outside rock guitarists to provide instrumental credibility while maintaining pop production values. The song reached number one on the Billboard Hot 100 and became associated with a notable anecdote involving Princess Diana, who reportedly told Jackson it was one of her favorite songs before his Wembley Stadium performance in 1988.