According to Skanda Purana, Dun formed part of the region called Kedar Khand. It was included in the kingdom of Ashoka by the end of the 3rd century B.C. It is revealed by history that for centuries the region formed part of the Garhwal kingdom with some interruption from Rohillas. For about two decades till 1815 it was under the occupation of the Gorkhas. In April 1815 Gorkhas were ousted from Garhwal region and Garhwal was annexed by the British. In that year the area now comprising tehsil Dehra Dun was added to district Saharanpur. In 1825, however, it was transferred to the Kumaon Division. In 1828, Dehra Dun and Jaunsar Bhabar were placed under the charge of a separate Deputy Commissioner and in 1829, the Dehra Dun district was transferred from the Kumaon Division to the Meerut Division. In 1842, Dun was attached to Saharanpur district and placed under an officer subordinate to the Collector of the district but since 1871 it is being administered as separate district. In 1968 the district was taken out from Meerut division and included in the Garhwal Division.
Dehra Dun can be divided into two distinct tracts i.e. the montane tract and the sub-montane tract. The montane tract covers whole Chakrata tehsil of the district and consists entirely of a succession of mountains and gorges and comprises Jaunsar Bhabar. The mountains are very rough with steep slopes. The most important features of the tract is the ridge which separates the drainage are of Tons on the west from that of Yamuna on the east. Below the montane tract follows the sub-montane tract, which is the famous Dun valley bounded by Shivalik hills in the south and outer scarp of the Himalayas in the north.
Dehra Dun is distinguished from most other districts in the state by the existence of very large forests chiefly stocked with sal. Forest products play an important role in the economy of the district. Besides, supplying fuel, fodder, bamboos and medicinal herbs, they also yield a variety of products like honey, lac, gum, resin, catechu, wax, horns and hides. The forests account for 1477 sq.kms of area, giving a percentage of 43.70 of the total area of the district. Owing to the variation in altitudes and other aspects, the flora of the district vary from tropical to alpine species. Different types of forests and varying species of shrubs, climbing plants and grasses, depending upon the aspect, altitude and soil condition are found in the district. Sal forest and coniferous forests are predominant in the western part of tehsil Dehra Dun. Chir is the only coniferous species in the old reserved forests of Dehra Dun. Besides other associates of chir, a few deodar trees are also seen in the district. Wide ranges of sal forest occur in this part of the tehsil. Sal is the main timber species and is generally pure towards the Siwalik ridges. A mixture of miscellaneous species are found in the lower parts. In the eastern part of tehsil Dehra Dun, the flora may be divided into a number of Botanical divisions mentioned below : Moist Siwalik Sal Forests : These forests are found in the Motichur and Thano forest ranges. Low quality of sal is found in these forests. The main associates of sal are bakli and sain. Moist Bhabar Doon Sal Forests : These forests are found in a large areas in Thano and Barkot forest ranges. Sal is pure in the overwood and its typical associates are sain and dhauri. the underwood growth includes karaunda and chameli. West gangetic Moist Deciduous Forests : These are found in the Kansro, Barkot, Motichur and Thano forest ranges. These are closed forests from medium to good height. The main associates of sal are safed siris, jhingan, bohera and dhauri. Dry Siwalik Sal Forests : These forests are found on the higher slopes of Siwaliks. In Chakrata tehsil they occur near the junction of the Tons and the Yamuna rivers in the neighborhood of Kalsi. Sal is the predominant species mixed with other associates viz. bakli, sain, haldu, jhingan etc. Besides the above many other types of forests occur in small belts in the plain of the district.