After independence in 1991, Ukraine struggled with political, economic, and social crises, which led to the expansion of drug trafficking and drug use, which subsequently enabled fast HIV spread. Interestingly, the two different HIV-1 subtypes (namely subtypes A and B), which were introduced to the country around the same time, had very dissimilar epidemiological histories due to social and cultural differences between the regions where these strains were initially introduced. Similarly, Ukraine and the neighbouring Russia chose opposite responses to the HIV epidemic, which resulted in very different trajectories for the two epidemics that shared the roots. Today the HIV epidemic in Ukraine is one of the largest in Europe: the country has an estimated 240,000 people living with HIV and the highest rate of new infections in Europe (~30 cases per 100,000 people). The military conflict, which began in Ukraine following a political insurgency and the Maidan movement in late 2013, disrupted provision of health care and HIV preventive services. Notably, the conflict caused massive internal human migration: since 2014 over 1.7 million people have been internally displaced in Ukraine, out of a total population of 45 million. Molecular epidemiology in combination with mathematical modeling and traditional epidemiological analysis was used to describe patterns of HIV spread in Ukraine before and after the conflict, and to show how the large-scale human migration have had an impact on epidemic dynamics within and among the regions of Ukraine.