The Leeds-born former Spice Girl, whose full name is Melanie Brown, was back on the panel for the second part of the final, which saw Ben Haenow crowned winner and Fleur East take second place.
Concerns over her health were first raised after she missed an X Factor Press conference on Thursday. It was later reported that she was suffering from a suspected stomach bug.
An X Factor spokesman said: “After being discharged from hospital and following medical advice, Mel has been deemed well enough to do the show. We’re delighted to have her back on the panel.”
After making her re-appearance last night, the singer told host Dermot O’Leary: “I really missed being here but thanks to all the doctors and nurses who took care of me and got me here tonight.”
Asked by O’Leary if she was feeling better, Mel said: “Yes - ish.”
Mel was replaced on Saturday night by former judge Tulisa Contostavlos. The show drew X-Factor’s lowest audience for a decade and trailed its BBC1 rival Strictly Come Dancing by more than a million viewers.
The ITV show had an average audience of 8.4 million, including those watching on the catch-up +1 channel, which was down 100,000 on the Saturday stage of last year’s finale. The only time it has fared worse was in 2004 when it pulled in 8.1 million for the first ever final, won by Steve Brookstein.
Strictly – which last night reached its semi-final stage – drew 9.9 million, which was also down 100,000 on the equivalent show last year.
Mark Ronson has topped the singles charts for the first time with Uptown Funk, which was rushed out after it was covered on the X Factor. The track, which features Bruno Mars, was released five weeks early after it was performed by Fleur East.