Prime Minister Jacinda Ardern, posting on Instagram, said she hadn't got to know many public servants as well as Bloomfield.
"Through his tireless dedication, his focus on people, his calm and considered approach - he has been a true public servant," she said.
"He has been central to our Covid success as a nation, and he's done it with humour and grace (I'll keep the details of his sporadic mockery of me to myself!). When we spoke about his decision to move on, he mentioned that he wanted to spend time with his family, and that's the least we own him," Ardern said.
In an email sent to Health Ministry staff, obtained by The New Zealand Herald, Bloomfield said it had been a "huge privilege" to be director general of health.
Bloomfield signalled with the Commissioner Public Service Commissioner Peter Hughes late last year he intended to step down before his term officially ended on June 11, 2023, Hughes said.
"Dr Bloomfield has worked tirelessly for more than two years to keep New Zealanders safe from coronavirus," Hughes said.
"Dr Bloomfield has demonstrated remarkable resilience and courage in leading the health system's overall response to Covid-19. That response has saved lives.
"Dr Bloomfield always wanted to stay until New Zealand was in a good place with coronavirus. That time is now."
Hughes will appoint an acting director general before Bloomfield finishes on July 29.
Bloomfield has become a household name after fronting press conferences throughout the pandemic.
Hughes said Bloomfield had played a vital role in New Zealand's successful Covid response.
He said that Bloomfield felt July was a good time to step away and have an extended break.
Bloomfield's message to Ministry of Health staff
"I've committed myself wholeheartedly to the role for nearly four years. The DG role is complex and challenging at any time and, with a one in 100 years pandemic, the last two years have been particularly challenging and intense," Bloomfield said in an email.
"I've done everything I set out to do when I came into the role. I would not have been able to do this without the support of many highly committed and talented people in the ministry and across the wider health system. The wider public service has done an outstanding job in helping lead the country through the Covid-19 pandemic and it's been a pleasure working with other public service leaders to help deliver the response."
He said with the changing nature of the pandemic, as well as the changes to the health sector with fewer DHBs, "it's a good time for me to step back and allow a new director- general to shape and lead the organisation in future".
"I'm confident the health sector and the Covid-19 response are in good hands, that NZ will continue to deliver a world-class response to the pandemic, and those leading the health system will plan and deliver the full range of care that New Zealanders need following the Omicron outbreak."
His focus on the next four months, he said, would be to ensure the ministry is well placed to take on its role well in the new health system, and that the systems and the people are in place to respond to the ongoing pandemic, including the challenges of the coming winter season.
"I'm looking forward to taking an extended break and spending time with family before deciding on what I will do next."
"Equally importantly, I'm still in the job for the next four months. We remain in the middle of a pandemic, we are assisting in the sector reorganisation and we're continuing with our vaccine programmes in the lead up to winter – so we'll continue the hard mahi for some time to come."