The Mercedes-AMG Petronas F1 team said Hamilton tested negative three times last week ahead of Sunday's Bahrain Grand Prix. He went on to win that race before he woke up on Monday with mild symptoms, the team said.
Hamilton also was informed on Monday that he had been in contact with someone who had tested positive for COVID-19. He was then tested and returned a positive result. The result has since been confirmed.
"I'm devastated that I won't be racing this weekend," Hamilton wrote Tuesday on social media. "Since we started the season in June, my team and I have been taking all the precautions we possibly can and following the regulations everywhere we've been in order to stay safe."
Hamilton said he has gone into self-isolation for 10 days.
"I'm gutted not to be able to race this weekend, but my priority is to follow the protocols and advice to protect others," Hamilton wrote.
"I'm really lucky that I feel only mild symptoms and will do my best to stay fit and healthy. Please look after yourselves out there. You can never be too careful."
The Mercedes-AMG Petronas F1 team has yet to announce a replacement driver for the Sakhir Grand Prix, which starts at 12:10 p.m. EST on Sunday in Bahrain.
"Lewis is now isolating in accordance with COVID-19 protocols and public health authority guidelines in Bahrain," Hamilton's team said. "Apart from mild symptoms, he is otherwise fit and well, and the entire team sends him its very best wishes for a swift recovery."