The city's foundations were laid in 1908, and it was named Campbellpur after Sir Campbell.
The history of the District is practically the same as that of Rawalpindi district. Hassan Abdal, the chief relic of the Buddhist period, was one of the towns subordinate to the capital of Taxila, and under the Gakhars, Mughals, and Sikhs the District followed the fortunes of Rawalpindi. The chief historical events recorded are the defeat of Anand Pal near Ohind by Mahmud of Ghazni, the foundation of ATTOCK by Akbar, and its vicissitudes in the Sikh Wars. The District was constituted in 1904, the tahsils of Attock, Pindi Gheb, and Fatahjang being transferred from Rawalpindi District, and that of Talagang from Jhelum.
Attock is located at 33° 46' 20N Latitude and 72° 22' 6E Longitude. It has an altitude of 348 metres (1,142 ft). The average annual rainfall in the district is 783 mm (30.8 in).
Attock District's climate is characterized by very hot summers and very cold winters. The maximum temperature reaches 40°C. The northern part is more humid, with a relatively moderate climate as compared to the southern part.
Attock district was constituted in 1904 by taking Talagang Tehsil from Jhelum district and Pindigheb, Fatehjang and Attock tehsils from Rawalpindi district. The district was named as Campbellpur after the name of Sir Campbell who laid foundation stone of Campbellpur City in 1908 a few kilometres away on south-east of Attock Khurd Town.
The name Attock was again given to it in 1978. District Attock is bounded on the north by Swabi and Haripur districts of N.W.F.P., on the East by Rawalpindi, on the South by Chakwal district, on the South-West by Mianwali district, in the West by Kohat district and on North-west by Nowshera district of N.W.F.P.