Hamilton will start on the front row because Sainz is to take a five-place penalty for fitting a fresh engine.
Hamilton said: “I am so, so happy to be here, it has been an incredible week. Difficult day yesterday but what a crowd we have had today.
“Starting from eighth and making my way slowly but congratulations to George. This just goes back to everyone back at the factory, everyone working here on the ground who have been working so hard this year, this is an amazing result.
“To be on the front row tomorrow is incredible. From there, we should be able to work as a team and hopefully hold off the guys behind.
“We are going to try as hard as we can. If we can get some good degradation tomorrow and some good weather, we could have a good fight on our hands. A win here for Brazil would be incredible.”