Nicol was born in Humbie (East Lothian), the son of Walter Nicol and Marion Fowler. According to the parish register, he was baptised on 18 April 1770. Some sources give his date of birth as 1768; other ones (including his gravestone) give 1766.
He started out as aide to his uncle, Henry Moyes, an itinerant lecturer in Natural Philosophy whose blindness necessitated assistance for his chemistry and optics demonstrations. Nicol, having himself become a popular lecturer on that subject at the University of Edinburgh, settled in Edinburgh to live a very retired life. Besides the prism that bears his name, he conducted extensive studies of fluid inclusions in crystals and the microscopic structure of fossil wood. He did not publish any of his research findings until 1826.
Nicol made his prism by bisecting a parallelepiped of Iceland spar (a naturally occurring, transparent crystalline form of calcium carbonate) along its shortest diagonal, then cementing the two halves together with Canada balsam. Light entering the prism is refracted into two rays, one of which emerges as plane-polarized light. Nicol prisms greatly facilitated the study of refraction and polarization, and were later used to investigate molecular structures and optical activity of organic compounds.
In 1815, Nicol developed a method of preparing extremely thin sections of crystals and rocks for microscopical study. He hit upon the plan of cutting sections of fossil wood, so as to reveal its minutest vegetable structures under a microscope. He took a slice from the specimen to be studied, ground it perfectly flat, polished it, and cemented it by means of Canada balsam to a piece of plate-glass. The exposed surface of the slice was then ground down, until the piece of stone was reduced to a thin transparent to translucent layer adhering to the glass, and the requisite degree of transparency was obtained. His technique of making thin sections made it possible to view mineral samples by transmitted rather than reflected light and therefore enabled the minerals' internal structures to be seen. Nicol prepared a large number of slices of fossil and recent woods. Many of these were described by Henry Witham in his Observations of Fossil Vegetables (1831), to which Nicol supplied the first published account of the process.
When Nicol died, his instruments and preparations passed to Alexander Bryson, who made many additions to the collections and made numerous thin slices of minerals and rocks for the purpose of exhibiting the cavities containing fluid, which had been described long before by David Brewster and Nicol.
He died at his home, 4 Inverleith Terrace in Edinburgh (now renumbered 12 Inverleith Terrace) on the 2 September 1851, and was buried in Warriston Cemetery. His burial site is now marked by a plaque on the east wall, north of the sealed eastern gate.