He was born in Leslie, Fife, the son of John Glenie, an army officer, and his wife, Margaret Smith. He was educated in Leslie before attending the University of St Andrews, where he began studying divinity but later excelled in mathematics. He graduated MA in 1769. He entered the Royal Military Academy at Woolwich as a cadet in the Royal Artillery and became a second lieutenant in 1776. He served with John Burgoyne and Barrimore Matthew St Leger during the American Revolution. Later, working for Governor Frederick Haldimand, Glenie was charged with establishing a barracks on an island at the east end of Lake Ontario. After a series of disputes with the commanding officer on the island, he was put to work at Sorel instead while awaiting a court martial. He was found guilty of conduct unbecoming an officer but the verdict was overturned. In 1779, he was elected a Fellow of the Royal Society. He married Mary Anne Locke during the early 1780s. In 1785, he was supervising army work parties in the Saint John River area of New Brunswick. Glenie applied for a land grant in the region but was not successful. He returned to England, but resigned his commission and brought his family to New Brunswick in 1787. He set up a business supplying masts for ships with a partner based in London. He encountered opposition in this enterprise from Thomas Carleton, governor for the province, who had taken part in Glenie's earlier court martial. Glenie began a series of attacks on Carleton and the ruling elite of the province. He was named deputy surveyor for the king's woods in New Brunswick in 1791 at the recommendation of John Wentworth. In January 1794, he was elected a Fellow of the Royal Society of Edinburgh, upon the proposal of John Playfair, Thomas Charles Hope and Andrew Duncan. By early 1795, Glenie was no longer involved in the masting business. In 1795, he introduced a bill which had the intent of granting more power to the elected assembly and less to the appointed legislative council. Glenie was one of the leaders in a dispute between the assembly and the council in 1802 regarding who had the power to recommend a replacement for the clerk of the house. Although Glenie was reelected in 1802, the remaining members of the assembly were more supportive of the governor. In 1804, Glenie left for England, leaving his wife, Mary Anne Locke, behind. A witness for the crown in the 1809 trial of Gwyllym Lloyd Wardle, he was severely criticised by Lord Ellenborough, the judge, and lost his reputation and positions. He died in poverty in Pimlico and was buried in the churchyard of St Martin-in-the-Fields in central London.
Works
'The Division of Right Lines, Surfaces, and Solids', Philosophical Transactions.
'General Mathematical Laws which Regulate and Extend Proportion Universally'. Philosophical Transactions. lxvii. 450,
A Short Essay on the Modes of Defence best adapted to the Situation and Circumstances of this Island … by an Officer,’ 1785.
The History of Gunnery, with a new method of deriving the theory of projectiles in vacuo from the properties of the square and rhombus, 1776.
The Doctrine of Universal Comparison, or General Proportion, 1789.
Observations on Construction, 1793.
The Antecedental Calculus, or a Geometrical Method of Reasoning, without any consideration of motion or velocity applicable to every purpose to which fluxions have been or can be applied, with the geometrical principles of increments, &c., 1793.
Observations on the Duke of Richmond's Extensive Plans of Fortification, and the new works he has been carrying on since these were set aside by the House of Commons in 1786, including the Short Essay which chiefly occasioned the famous debate and division in the House of Commons on his Grace's projected works for Portsmouth and Plymouth, 1805.
Observations on the Defence of Great Britain and its Principal Dockyards, 1807.
He contributed papers to the Transactions’ of the Royal Society of Edinburgh 'On the Principles of the Antecedental Calculus',, 'On the Circle',, and 'On a Boy born Blind and Deaf',.
In Francis Maseres's Scriptores Logarithmici will be found his 'Problem concerning the Construction of a certain Triangle by means of a Circle only', vol. iv., commented on by Maseres in vol. vi., and ‘A Demonstration of Sir I. Newton's Binomial Theorem,’ vol. v.
He contributed articles to Rees's Cyclopædia on Artillery carriages, Cannon and Fortification.