Nepenthes rajah has a very localised distribution, being restricted to Mount Kinabalu and neighbouring Mount Tambuyukon, both located in Kinabalu National Park, Sabah, Malaysian Borneo. Mount Kinabalu is a massive granitic dome structure that is geologically young and formed from the intrusion and uplift of a granitic batholith. At 4095.2 m, it is by far the tallest mountain on the island of Borneo and one of the highest peaks in Southeast Asia. The lower slopes of the mountain are mainly composed of sandstone and shale, transformed from marine sand and mud about 35 million years ago. Intrusive ultramafic (serpentine) rock was uplifted with the core of the batholith and forms a collar around the mountain. It is on these ultramafic soils that the flora of Mount Kinabalu exhibits the greatest levels of endemicity and many of the area's rarest species can be found here.