A five-minute sex tape showing Tupac receiving oral sex while rapping and dancing has surfaced ... and TMZ has seen it.

The tape, shot in 1991, begins with a bunch of groupies in a living room during a house party. Tupac walks into the room with his pants down to his ankles, his shirt off ... sporting several chains.

Tupac -- whose head is shaved -- pulls one of the women toward him, and she begins performing oral sex. As she does her thing, an unreleased song of Tupac's is playing in the background, as Tupac is singing along and dancing, wiggling his hips.

And it gets even better. As the woman services Tupac, who is holding a cocktail in one hand and a blunt in another, Money B from Digital Underground walks over to him. Tupac puts his cocktail arm around Money B, continues singing and dancing ... and the woman never stops.

As the tape ends it appears he's ready to begin sexual intercourse. It's unclear if there's another tape.

We've learned the person in possession of the tape is making plans to release it.