According to reports, Carlson was fired for a couple of reasons:
Offensive language he made towards women, which came to light when he was forced to handover his text messages and emails as part of the Dominion proceedings. - One particularly crude message was aimed at a Fox female executive. Fox it seems was forced to redact the message when some of the papers were unsealed, as it was concerned that if the messages were made public, it would embarrass the company and damage the company financially in it's relations with blue chip companies. - No doubt a reflection of Murdoch's comments in his deposition that it wasn't about red or blue, but green.
Also Carlson was increasingly seen as being toxic and getting too big for his boots.
I shouldn't be surprised if the law suit lodged by Carlson's former producer against Fox also played a part.