Soon after, Jason Bowen, a friend of Legg's joined Reading and, thanks to Bowen's praise of the club, he agreed a deal to sign for the Berkshire based side in February 1998. Just several weeks later manager Terry Bullivant was sacked and replaced by Tommy Burns who soon fell out with several players including Legg and Bowen. Burns ignored the group of players, who later became known as the "gang of five", and refused to let them be a part of the first team, resulting in them taking part in separate training sessions taken charge of by reserve team manager Alan Pardew, who took over from Burns following his dismissal. Pardew later commented that ""I wish they had stayed. Andy would certainly be in my team now and Jason showed he had a lot of talent."
After a brief spell on loan at Peterborough United, he joined Cardiff City in 1998. Legg was initially unpopular with fans due to his previous spell with South Wales rivals Swansea City, even being sent death threats, former teammate Winston Faerber had his finger sliced open after opening one of Legg's letters which contained a razor blade. However, he eventually became a fan favourite and was awarded the club's player of the season award in the 1999–2000 and 2000–01 seasons. In 1999, Legg's wife Lucy noticed a lump on his neck which was later diagnosed as a non-malignant tumour. With the 1999–2000 season coming to an end, Legg decided to play on for the remainder of the season, the only people aware of his condition at the club being manager Billy Ayre, physio Mike Davenport and club doctor Len Noakes, before having the tumour removed at the Princess of Wales Hospital in Bridgend in May 2000.