He was born at Kirkhill near Penicuik, south of Edinburgh. He was the son of Andrew Johnston and Isabel Keith. His brother was Thomas Brumby Johnston FRSE.
After an education at the High School and the University of Edinburgh he was apprenticed to the Edinburgh engraver and mapmaker, James Kirkwood. In 1826, he joined his brother William (who would become Sir William Johnston, Lord Provost of Edinburgh) in a printing and engraving business, forming the well-known cartographical firm of W. and A. K. Johnston with offices based at 4 St Andrew Square in Edinburgh's New Town (demolished 2016) and their printworks based at Edina Works, off Easter Road. The firm used the clan motto of "Ready Aye Ready" as their logo. Early hikes in the West Highlands had led Johnston to despair at the accuracy of maps, and inspired a deire to rectify this. The rest of Johnston's life was devoted to geography, his later years to its educational aspects especially. His services were recognised by the leading scientific societies of Europe and America.
In October 1849, he was elected a Fellow of the Royal Society of Edinburgh, his proposer being Robert Chambers. In 1862 he was a founding member of the Meteorological Society of Scotland. He was awarded an honorary doctorate (LLD) in 1865.
His Edinburgh address in later years was 16 Grosvenor Crescent in the affluent West End.
He died at Ben Rhydding, Yorkshire, in 1871. He is buried in the north-west section of Grange Cemetery in Edinburgh.
His interest in geography had developed early, and his first important work was the National Atlas of General Geography, which gained for him in 1843 the appointment of Geographer Royal for Scotland. Johnston was the first to bring the study of physical geography into competent notice in England. His attention had been called to the subject by Alexander von Humboldt; and after years of labour he published his magnificent Physical Atlas in 1848, followed by a second and enlarged edition in 1856. This, by means of maps with descriptive letterpress, illustrates the geology, hydrography, meteorology, botany, zoology, and ethnology of the globe.
Johnston published a Dictionary of Geography in 1850, with many later editions; The Royal Atlas of Modern Geography, begun in 1855; an atlas of military geography to accompany Alison's History of Europe in 1848 seq.; and a variety of other atlases and maps for educational or scientific purposes. A book on astronomy named "School Atlas of Astronomy" (published 1856) was written by him.
He married Margaret Gray in 1837. She was thereafter known as Margaret Keith Johnston.
His eldest son, also named Alexander Keith Johnston (1844–1879), was also the author of various geographical works and papers.