The Cape Cobra is a diurnal species and actively forages throughout the day. During very hot weather it may become crepuscular, but is rarely if ever observed during the hours of darkness. It is a terrestrial snake, but will readily climb trees and bushes, and shows considerable agility in itself, for example systematically robbing the nests of the sociable Weaver. When not active, it hides in holes or under ground cover, such as brush piles, often remaining in the same retreat for some time. It is a quick moving and alert species, and although a report mentions that this species is generally calm when compared to some other African venomous snakes, it strikes readily if threatened. When disturbed and brought to bay the Cape Cobra raises its forebody off the ground, spreads a broad hood and may hiss loudly. While on the defensive, it strikes unhesitatingly. If the threat remains motionless, the snake will quickly attempt to escape, but at any sign of movement will adopt its defensive posture again. The Cape Cobra is more aggressive during the mating period.
It feeds on a wide spectrum of prey, including other snakes, rodents, lizards, birds, and carrion.