King cobras range across India, Nepal, Bhutan, Bangladesh, Myanmar, Thailand, China, Vietnam, Malaysia, Indonesia, the Philippines, and Hong Kong. They favour tropical and subtropical forest, usually near streams and rivers, and also use mangroves and forest edges bordering farmland.
Suitable habitat is normally a mosaic rather than unbroken deep forest: riparian strips, bamboo, clearings, and plantations beside native vegetation can all supply cover and prey, because moist leaf litter holds the snakes king cobras hunt and streams provide travel routes. Capable swimmers, they cross rivers and enter flooded ground during seasonal movement. Forest edges also bring risk — roads expose moving snakes to traffic, and a snake following a scent trail can enter a garden or poultry pen without seeking people.