Stojanovic led Domzale to the Slovenian league title in 2007 and 2008 and Red Star Belgrade to the Serbian league title in 2014. He has also coached clubs in Belgium, China and Latvia and worked as the United Arab Emirates' assistant coach between 2009 and 2011.
The 49-year-old, who signed a three-year contract, will replace former Finland coach Mixu Paatelainen, who left at the end of his contract in December.
"Stojanovic was our first candidate, our priority in the search for the head coach," the LFF president Kaspars Gorkss said.
Latvia are in Group G of the Euro 2020 qualifying phase alongside Poland, Austria, Israel, Slovenia and Macedonia.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
Latvia, who have not qualified for the finals of a major tournament since their only appearance at a European Championship in 2004, visit Macedonia on March 21 in their first qualifier and Poland three days later.
(Reporting by Angel Krasimirov; Editing by Toby Chopra)
