Shevchenko, who retired from football in 2012, took on the role in July 2016, stepping up from his position as the assistant manager of the side.
The former Chelsea and AC Milan striker qualified Ukraine to the 2020 European Championship after missing out on a place at the 2018 FIFA World Cup in Russia.
Shevchenko guided Ukraine to the quarterfinals of EURO 2020 for the first time in their history before losing 4-0 to England.
The 44-year-old announced his departure as Ukraine manager with a post on social media on Sunday.
"Today, my contract with the Ukrainian Football Association came to the [sic] end," he posted on Instagram. "I spent five years with the national team.
"It was hard work that proved that we are capable of playing modern football. I am grateful to the president and the executive committee of the UAF for the opportunity to work with the Ukrainian National team.
"I am thankful to every player, every person who helped and was involved in the team. Many thanks to all the fans for their support and criticism.
"Together, we managed to show that our football can be competitive, productive and exciting. With faith in Ukraine."
Shevchenko won the much coveted Ballon d’or award in 2004 while on the books of AC Milan.