Former Border watchdog chief David Neal said he was sacked over Microsoft Teams “for doing my job”.
Mr Neal slammed “shocking leadership” within the Home Office after his staff found out about his dismissal in the media.
He also claimed Downing Street blocked his “reappointment” despite having support from Home Secretary James Cleverly.
Just hours before his sacking Mr Neal, the chief inspector of borders and immigration, warned that “high-risk” private and charter jets were landing without thorough checks.
Asked about his departure, Neal said he was “sacked for doing my job.”
He added: “I think I’ve been sacked for doing what the law asks of me. And I’ve breached, I’ve fallen down over a clause in my employment contract, which I think is a crying shame because I think I can do my job extremely well.
“I’ve been candid with this committee. We’ve produced multiple reports that have exposed the sometimes lack of effectiveness and lack of efficiency in the system that the Borders Act sets me up to inspect.
“I think I’ve worked very very hard with the Home Office to try and work with them to achieve what the legislation asks of me.”
Asked about his claim that he was sacked by Microsoft Teams, Neal said: “Yes. It was the most high-performing team of 30 civil servants.
“The notification that I was sacked was actually in the media before my team or I had the chance to speak to them, which is shocking, shocking leadership.”
David Neal, whose tenure as the independent borders watchdog was due to end on March 21, claimed No 10 had blocked his reappointment before he was ultimately fired.
He told the Home Affairs Committee: “I now know that the Home Office, so the ministers, supported my reappointment, my extension, my reappointment. And the Home Secretary supported my reappointment.
“That reappointment process was sent to the Cabinet Office and that was sent on to No 10 and it was turned down by No 10.
“So I’ve no idea why it was turned down by No 10.”
He added: “So I can’t tell you, I can’t tell you why I have not been reappointed. But I can tell you that the Home Office, as far as I understand from material that has been disclosed to us, approved my reappointment.”
The material was disclosed as part of a judicial review in relation to the Manston migrant processing centre.