Vettel clocked 1min 31.095sec at the Shanghai International Circuit, ahead of teammate Kimi Raikkonen.
Valtteri Bottas was third fastest ahead of Hamilton.
Vettel’s blistering final lap ensured back-to-back front row lockouts for Ferrari for the first time in 12 years.
“The car was really amazing, it just kept getting better. So I’m really happy,” Vettel said.
“I was a bit beaten up but knew that, if I could get a tidy lap and have a little bit of margin, I can push it. It was really good."
Hamilton was half a second behind the German driver. “We started the weekend positively in practice, but the car went away from us today. The pace just wasn’t there," he said.
Mercedes are under pressure following Vettel’s wins in the first two races in Australia and Bahrain that has helped him open a 17-point lead in the standings over Hamilton.
The Red Bull Racing duo of Max Verstappen and Daniel Ricciardo took the fifth and sixth grid spots followed by Nico Hulkenberg, Sergio Perez, Carlos Sainz and Romain Grosjean.