Ex-Ireland manager McCarthy, who joined Ipswich in November 2012, guided them to the 2014-15 playoffs where they lost to local rivals Norwich City in the semi-finals. They have struggled for consistency this term and are 12th in the table.
"I said I would see the season out but it's been a new experience and it's not one I have been enjoying to be honest," he told the official club website.
"I have continued to do my job to the best of my ability but there is something missing and I'm not comfortable with that.
"I have had a great time here and worked with some great people and to all those who have given me wonderful support over the last five and a half years - and there are many - I want to put on record my personal thanks."
Ipswich beat Barnsley thanks to Jonas Knudsen's goal early in the second half.
(Reporting by Toby Davis; Editing by Ken Ferris)
