The former prime minister began the marathon three-hour session with a Bible in his hands, as he swore: "Hand on heart, I did not lie to the House."
He admitted social distancing had not been "perfect" at gatherings in Downing Street during Covid lockdowns.
But he said they were "essential" work events, which he claimed were allowed.
He insisted the guidelines - as he understood them - were followed at all times.
But MPs challenged his assertions, with the committee head, Labour's Harriet Harman, at one point describing them as "flimsy", and saying they "did not amount to much at all".
He also clashed repeatedly with Conservative MP Sir Bernard Jenkin, angrily telling the senior Tory he was talking "complete nonsense" by suggesting he had relied too much on what political advisers were telling him.
The Privileges Committee is investigating statements Mr Johnson made to Parliament, after details of booze-fuelled parties and other gatherings in Downing Street emerged in the media from the end of 2021 onwards.
If he is found by MPs to have deliberately or recklessly misled Parliament, he faces suspension from the Commons - a move that might trigger a by-election in his Uxbridge and South Ruislip constituency.
Mr Johnson, with a legal adviser at his side, and supporters including former cabinet minister Jacob Rees-Mogg sat behind him, was in a combative mood as he took MPs' questions for the long-awaited session.
The main thrust of his argument was that boozy gatherings in Downing Street and staff leaving dos had been "essential" work events, which he believed had been in line with the Covid guidelines in place at the time.
He insisted statements he gave to the Commons - including when he told MPs in December 2021 that Covid rules and guidance were followed "at all times" - were made "on the basis of what I honestly knew and believed at the time".
Shown a picture of himself surrounded by colleagues and drinks during a leaving do, Mr Johnson argued No 10 staff cannot have an "invisible electrified fence around them".
"They will occasionally drift into each other's orbit," he said, accepting that "perfect social distancing is not being observed" in the image but denying it was in breach of the guidance.
"I believe it was absolutely essential for work purposes," he said of the event for outgoing communications director Lee Cain in November 2020.
"We were following the guidance to the best of our ability - which was what the guidance provided."
He said when he told MPs on 1 December 2021 that the guidance had been followed at all times, he was recalling the "huge" amount of effort to try and stop Covid spreading within No 10.
He gave examples of measures in place such as keeping windows open, working outdoors where possible, limiting the number of people in rooms and testing, which "helped mitigate the difficulties we had in maintaining perfect social distancing".
Sir Bernard replied: "I'm bound to say that if you said all that at the time to the House of Commons, we probably wouldn't be sitting here. But you didn't."
Asked later in the session by Conservative MP Andy Carter if he should have made these arguments at the time, he said: "Perhaps if I had elucidated more clearly what I meant - and what I felt and believed about following the guidance - that would have helped."
Other key moments included:
* Mr Johnson said the process being used to decide whether he was in contempt of Parliament was "manifestly unfair" and he claimed MPs "found nothing to show that I was warned in advance that events in No 10 were illegal"
* Ms Harman rejected claims of bias, saying the MPs would leave their "party interests at the door of the committee", amid claims by Mr Johnson's supporters that it was a "kangaroo court"
* Mr Johnson said that if it was so "obvious" that there was rule-breaking in No 10, as the committee has argued, then it would also have been "obvious" to others, including the now Prime Minister Rishi Sunak
Questioned on whether he would have told other organisations, if asked at a government pandemic press conference, whether they could hold "unsocially distanced farewell gatherings", Mr Johnson said: "I would have said it is up to organisations, as the guidance says, to decide how they are going to implement the guidance amongst them."
He also insisted his birthday gathering, in June 2020 at the height of the pandemic, for which he was fined by police, had been "reasonably necessary for work purposes".
And he defended the presence of luxury interior designer Lulu Lytle - who was revamping the Johnsons' Downing Street flat - because she was a "contractor" working in No 10.
He said then Chancellor Rishi Sunak, who was also present, would have been "just as surprised as I was" about the fines they received.
"I thought it was a completely innocent event," Mr Johnson said. "It did not strike me as anything other than an ordinary common or garden workplace event."
In another tetchy exchange with Sir Bernard, Mr Johnson was asked about his comments that it was "no great vice" to rely on political advisers for assurances before making statements to the House of Commons.
Sir Bernard expressed surprise that Mr Johnson, if there was even "the thinnest scintilla of doubt" about whether rules were followed, would not have sought advice from civil servants or government lawyers.
"If I was accused of law-breaking and I had to give undertakings to Parliament... I would want the advice of a lawyer," Sir Bernard told him.
A clearly annoyed Mr Johnson told the senior Tory: "This is complete nonsense, I mean, complete nonsense.
"I asked the relevant people. They were senior people. They had been working very hard."
The committee will deliver its verdict on Mr Johnson by the summer.
The full House of Commons would vote on any sanction it recommends. Mr Sunak has agreed to give Tory MPs a free vote on their conscience over Mr Johnson's fate.