The shortest way to reach Sarajevo from Belgrade, the capital of Serbia, is the A3/E70 Highway, which runs between Belgrade and Zagreb. Once you come to the town of Ruma, you’ll get off the highway and continue on Route 21 until you come to Šabac. You’ll continue on Route 19 to Loznica and then further on to Mali Zvornik, where you will cross the border from Serbia into BiH.
From Zvornik you’ll take Route M-19, which passes through Vlasenica, Sokolac and Pale. You’ll enter Sarajevo from the north. The entire journey takes approximately four hours and thirty minutes.