No. It was a missile from another plane that hit his.
A Zuni rocket fired from across the deck. IIRC, it hit one of McCain's external tanks. (I'm not sure if the A4 had wing tanks or a centerline external tank.) The rocket didn't explode but it did get the fire started.
Wikipedia has a good writeup on the incident here:
Having seen a lot of A4 Skyhawks as a kid (grew up near Willow Grove NAS), I’d say the most common configuration was a centerline fuel tank.