When South Africa became a union in 1910, it was undecided about what capital would become the national capital. So, they split it. (It was unlike e.g. the USA and Australia, which built a new capital.)
I don't know of any other country in the world that has a split capital like that.