Penny Mordaunt, a former international development secretary, was appointed as Britain's first female Defence Secretary, with prisons minister Rory Stewart replacing her at DfID.
Williamson claimed he was the victim of a vendetta by Sir Mark Sedwill, the Cabinet Secretary, who conducted the inquiry into the leak from a National Security Council meeting.
May said there was "compelling evidence" that Williamson was "responsible for the unauthorised disclosure" of information. But he made a fightback, saying: "She has got the wrong person."
He said that in a half-hour meeting with May: "I told her 'I very much hope that you understand you have sacked someone who has not leaked this'."
May said she considered the matter "closed" and refused to call in the police, despite demands from Opposition MPs to instigate a criminal investigation over what they claimed to be a breach of the Official Secrets Act.
Williamson said he would have welcomed a police inquiry. He told Sky News: "I wanted a police investigation because I would have been cleared."
He added the police would have required evidence, which Downing Street had so far failed to produce, and that he was the victim of a "witch hunt" and "a kangaroo court with a summary execution".
He said he was prepared to "swear on my children's life" that he was not the source of the leak.
Friends of Williamson claimed that Sedwill told a meeting last week that Williamson was behind the leak, two days before the Defence Secretary had been interviewed and before the inquiry had properly begun.
Williamson and Sedwill have clashed repeatedly in recent months, and government sources said the Cabinet Secretary and national security adviser was "desperate to sack someone" after repeated leaks from Cabinet meetings.
Downing Street was unable to offer any proof that Williamson was behind the leak and is likely to come under pressure to publish the evidence that led to his sacking.
Williamson, a former chief whip, said in a letter to May: "I strenuously deny that I was in any way involved in this leak and I am confident that a thorough and formal inquiry would have vindicated my position."
He told the Telegraph: "I was offered the opportunity to resign but I said I would not resign for something that I haven't done. She has got the wrong person and the person who did leak this is still out there." He added that he had been "completely screwed".
Williamson was brought into the Cabinet in 2016 as a reward for his loyalty to May, and was a surprise choice at the time.
May said in her letter to Williamson: "I am concerned by the manner in which you have engaged with this investigation... your conduct has not been of the same standard as others.
"I put to you the latest information from the investigation, which provides compelling evidence suggesting your responsibility for the unauthorised disclosure.
"No other, credible version of events to explain this leak has been identified."
She added that she could "no longer have full confidence" in Williamson.