From Sonic Retro
Mega Mack is the unpleasant purplish-pink liquid which flows around the bottom of Chemical Plant Zone Act 2. This term has never been used in Japan, where the chemical went unnamed, and hasn't been used in any games or game manuals since Sonic the Hedgehog 2.
According to the US and European manuals for Sonic the Hedgehog 2, the factory was intentionally flooded with this toxic substance by Dr. Robotnik with the intention of poisoning Sonic within minutes, while Japanese sources say that it's just water with an odd colouring. While allegedly poisonous, Mega Mack is functionally just re-coloured water in Sonic the Hedgehog 2, posing the hedgehog no more difficulty than the regular wet stuff; although an absence of air bubbles in Chemical Plant can make survival more difficult in practice.
The Mega Mack returns as part of the Chemical Plant stage in Sonic Generations and carries the same properties as in Sonic 2, but now includes air bubbles. Tails points out that the Mega Mack makes him really nervous for some reason, referring to it as "pink water". The Mega Mack also returns in Sonic Mania, albeit appearing in Act 1 instead.
Mega Mack returns again in Sonic Forces, found in Chemical Plant as usual, and also in Network Terminal where it is part of a unique gimmick for the stage: a shower of Mega Mack that can rotate platforms and immobilize Sonic if he gets caught underneath it.
In other media
In Sonic the Comic, one of Sonic's foes, Megatox, is a being composed entirely of Mega Mack who was originally a scientist who worked with Robotnik to create the pink stuff until he was trapped in a chamber with it. He is first encountered in STC #10.