From Kota Kinabalu I did an all-day road trip in a loop around southern Sabah. A route suggested by Rough Guide, it goes from KK over the steep hills of the Crocker Range to Tambunan, Keningau and Tenom, then further south before swinging back north to Sipitang and Beaufort. (My driver did not know of any road from Tenom to Beaufort, and followed the route he was advised to take when he asked for directions.) From Beaufort we drove north-west up the road to KK - a journey of more than 300 kilometres.
An alternative would be to travel by road to Tenom, then catch the train by Beaufort, then probably catch a bus to KK. (Trains from Tenom to Beaufort are not coordinated with trains from Beaufort to KK.)
My Sabah road trip, a route suggested by Rough Guide
Leaving Kota Kinabalu (shot through the windscreen)
A traditional Malay men's hat as roadside monument