The song, written and composed by Michael Jackson and Teddy Riley, is about keeping a relationship secret between lovers. "In the closet" is an English idiom used when one is not open about an aspect of their life, particularly in regard to sexual orientation. Despite the song's suggestive name its lyrics do not allude to hidden sexual orientation but rather a concealed relationship; "Don't hide our love/ Woman to man." The New York Times stated, "Only Jackson would use that title for a heterosexual love song..." Rolling Stone described the number as "titillatingly titled" but "determinedly heterosexual."  The single's music video, directed by Herb Ritts, features Jackson performing sensual and physically complicated dance techniques with supermodel Naomi Campbell. The song's female vocal was originally labeled "Mystery Girl" but was later revealed to be Princess Stéphanie of Monaco. Campbell mimed the lyrics for the music video.
The song, with its heavy industrial-sounding percussion and uptempo arrangement, is typical of producer Teddy Riley's new jack swing style. The unique, Eastern-influenced backing vocals, reaching crescendo at middle eight imbue the song with an erotic edge usually missing from Jackson's music. His vocals are whispered and subdued for most of the song, embellished with gasps, moans, and shudders. It is generally considered one of his most provocative singles with lyrics that include "...And if it's aching, you have to rub it."
The song was not performed during Jackson's Dangerous World Tour (however, during his concert in Toulouse, the band played a short instrumental before Man In The Mirror), but a short version, with the intro of "She Drives Me Wild," was the third song of a medley including "Scream" and "They Don't Care About Us" during the HIStory World Tour. Princess Stéphanie's spoken lines were replaced with Jackson's live speech for the sequence.