The Original Botanic Garden was founded by the University of St. Andrews in 1889 in the precincts of St. Mary's College by a group of enthusiasts led by Dr John Hardie Wilson. The original garden was about 0.1ha (0.25 acres) in size and consisted of 78 regularly-shaped beds laid out according to the Bentham and Hooker plant classification. By 1960 the old Botanic Garden covered 2.8ha (7.8 acres). In addition, plants were grown in a variety of soil and climatic conditions in other parts of the University

The current Botanic Garden site of 7.5ha (18.5 acres) was created from two fields in the early 1960s to cater for expansion of the collection and release the town centre lands for other purposes. In 1987, the Garden was leased to Fife Council.  In 2014 St Andrews Botanic Garden Trust was formed from the Education Trust and took full responsibility for the garden with continued support from Fife Council and the University of St Andrews.

Several layers of plants were planned; from tall forest trees to small understory trees and shrubs of all sizes, to make full use of the space available and to grow plants in the conditions they would naturally inhabit.
Boundary planting against the prevailing winds was the first priority, with the establishment of a coniferous shelter-belt to the west. Shrub borders within the perimeter give increasing shelter and provide micro-climate conditions for some semi-tender plants.
Situation, topography and soil conditions dictate the design of a garden. The aim at St Andrews Botanic Garden continues to be to create not only an amenity in which to relax and enjoy the beauty and atmosphere, but also to provide a scientific garden for teaching and research purposes.

Collections

About 8,000 taxa are grown outdoors and under glass. Special collections have been developed over the years for research projects and to hold species of particular interest.

Cotoneaster

There are 141 records in the garden database which have been verified by J Fryer as part of her research for the European Garden Flora. This is an important collection nationally and is spread through the garden.

Berberis

The core of this collection was obtained in 1960 from Dr Ahrendt who wrote the monograph in the Botanical Journal of the Linnean Society in 1961. Recent additions from the Beer, Lancaster Morris expedition to Nepal in 1971 and the Sino-British Expedition to Cangshan in 1981 have enhanced the collection.

Sorbus

This collection provided specimens for a physiological research project in the Botany Department, University of St Andrews. It has been enhanced by a generous donation by Ness Botanic Garden (University of Liverpool). There are 130 records in the Garden database.

Specialist Borders

In recent years, two geographical borders have been planted to widen public awareness of plants.

The China Border contains the bulk of the woody material collected by the 1981 Sino-British Expedition. (The Hon. Curator was leader of this joint expedition with the Chinese botanists from the Kunming Institute, Chinese Academy of Sciences.) It is being added to constantly with new and wild-collected material.

The Chile Border contains a broad representation of the endemic woody Chilean flora and is now beginning to be supplemented with herbacious perennials and bulbs.

An academic assessment of the Algal Herbarium was undertaken in 2013.