How to ask for recommendation letter from someone already knew me? due to covid, I think I will not be able to meet him in person. Writing him an email is the only option. In the email, should I introduce again to him who I am? He already knew and remembered my name.
Could you please tell me a format I could use?
In my experiences, emails are a formal kind of communication, so it shouldn't hurt to compose and format formally.
Depending on how well you know each other, the &quot;introduction&quot; can be as long as an attached curriculum vitae or as short as a line of &quot;I am Jon Doe&quot;.
If you've contacted that person in just a month and a half (which is quite short), you can go brief in this part and just say &quot;I'm Jon Doe&quot; and continue on describing your desires (tell them you want a reference letter). Try to correctly evaluate their familiarity with you - not every professor remembers their course students that well, in which case you may still want to include more details, up to a complete copy of your CV.
In addition, for these kinds of emails (requesting work or help from others), I prefer to err on the side of safety by being professional.
The last time I asked a professor for a recommendation letter around half a year ago, in a very similar situation to you. I attended courses from this professor and participated in contests and won good prizes (where all teammates were MSc students in his lab). I had not worked in research projects in his lab. I ended up writing my request email like this:

Dear Prof. Jon Doe,
I am iBug. I'm applying for a plumber at Super Mario Bro's Institution and I'm looking for a referral letter.
I attended your courses [course A] and [course B] and received grades of A+ and A, respectively. I also took part in [example competition] in a team and won the 1st prize. My full CV is attached in this email, too.
I'd be very glad if you can write a letter for me. I'm looking forward to hearing from you.
Best wishes,
iBug

Be sure to change specific wording / sentences according to your situations.