The Spaniard, who has a new team mate this season in compatriot and triple champion Jorge Lorenzo, lapped the floodlit Losail circuit inside the lap record with a best time of one minute 53.380 seconds in the second session.
Watch MotoGP highlights on Quest
Spaniard Maverick Vinales was second fastest for the factory Yamaha team, but nearly half a second slower.
Qatar Grand Prix
Ducati's Qatar winglet ruled legal by FIM
"It was a really positive day," said Marquez, who had surgery in December.
Moto GP Qatar -Marc Marquez win the Moto GP Free Practice 2
Image credit: Eurosport
"The lap was fast but the most important thing is our rhythm. We still need to work a little bit on this but we’re finding our way and (we're) happy with how today ended.
"Normally we struggle a lot at this circuit but we are there more or less."
Lorenzo, who has moved from Ducati to take the place of Dani Pedrosa and is also not 100 percent fit after surgery, was second fastest in the opening session but dropped to 11th at the end of the day.
The 31-year-old said he was also happy with the way the bike was handling and felt confident and comfortable on it.
"We have a lot of potential and (are) working well and I believe we can arrive there... I have the feeling we can be very competitive with the right setting."
Italian great Valentino Rossi, racing into his 40th year, was fastest in the first session for Yamaha and the only rider not to go faster in the evening when he ended up 16th on the combined timesheets.
Qualifying for Sunday's race is on Saturday.
Rossi announces decision to retire at end of season
MotoGP star Jason Dupasquier dies after crash