Nixon resigned because he was going to be impeached, and convicted in the impeachment, and he couldn't stop it. The House committee (whichever one originates such things) had already voted to impeach. It was then going to go to the full House, which would have voted to impeach, but Nixon resigned first.
To show what a different world it was then, the chair of the House committee, a Democrat, called his wife to tell her "we voted to impeach", *and then started crying" because it was horrible that it had come to that, and that the president had done such things. Today they would have been cheering.