Madonna has gone back in time … for a sexy video shoot in the middle of Times Square.

The Material Girl looked like a version of her former self on the set of what we’re told is a spot for the upcoming MTV Video Music Awards … featuring a NYC taxi cab right out of the ’80s.

Madonna arrived at Times Square at 3 AM for the shoot with her much-younger boyfriend, professional dancer Ahlamalik Williams, along with her entourage.

As you can see … Madonna was rocking a platinum blonde wig, trench coat and high heels for the gig, in which she throws some cash in the cabbie’s face and walks away with that classic swagger of hers.

We’re told it was raining on and off so Madge had to take some breaks to stay dry, and the shoot wrapped up at 6 AM.

The VMAs air September 12, so we won’t have to wait long to enjoy Madonna’s finished product.

More at TMZ