He was born in County Leitrim and educated at Trinity College Dublin. He was elected a Scholar in 1769, and graduated in 1771 with a BA. He was ordained in the Church of Ireland and became rector of St. James and then St. Catherine's in Thomas St. in Dublin. He carried out a great deal of work on behalf of the poor, including establishing the Erasmus Smith Free School on the Coombe and other institutions.
In 1798 he carried out a census of the city of Dublin (a difficult undertaking at the time on account of the 1798 Rising). Epidemic diseases were then frequent in Dublin, but, undeterred by the fear of infection, he personally inspected nearly every house in the city and questioned nearly every inhabitant. Hitherto the extent of the population had been only vaguely conjectured - he counted a total population of 182,370. He published the results of his investigations in 1805 in his Essay on the Population of Dublin in 1798. The many detailed statistics which he accumulated were stored in the city archives in Dublin Castle, which were among those destroyed in the Four Courts during the Irish Civil War in 1922.
In 1805 he was made one of the members of the commission to inquire into the conduct of the paving board of Dublin. He formed the Meath Charitable Loan in 1808.
- Whitelaw, James An essay on the population of Dublin, being the result of an actual survey taken in 1798 Dublin, 1805.
- History of the City of Dublin by Whitelaw, Warburton, and Walsh. Vol. 1 of 2, London, 1818.
- Parental Solicitude (Dublin, 1800)
- A System of Geography, of which the maps only (engraved by himself) were published
- An Essay on the best method of ascertaining Areas of Countries of any considerable Extent (Transactions of Royal Irish Academy, vol. vi.)
- Boylan, Henry (1998). A Dictionary of Irish Biography, 3rd Edition. Dublin: Gill and MacMillan. p. 444. ISBN 0-7171-2945-4.
- One or more of the preceding sentences incorporates text from a publication now in the public domain: O'Donoghue, David James (1900). "Whitelaw, James". In Lee, Sidney (ed.). Dictionary of National Biography. 61. London: Smith, Elder & Co. pp. 109, 110.
- Irish Times, 3 November 1934, p. 6
- Webb, Alfred (1878). . A Compendium of Irish Biography. Dublin: M. H. Gill & son – via Wikisource.
- Gilbert, John (1854). A History of the City of Dublin. Oxford: Oxford University.
- George Newenham Wright (2005). "An Historical Guide to the City of Dublin, 1825". Online book. Archived from the original on 31 October 2007. Retrieved 2 February 2009.
- Casey, Christine (2005). Dublin: The City Within the Grand and Royal Canals and the Circular Road with the Phoenix Park. Yale: Yale University Press. ISBN 0-300-10923-7.
- F. Elrington Ball: A History of the County Dublin. 1903. Part II.
- St. James' Graveyard, Dublin - History and Associations (Dublin, 1988)
- Ireland Sixty Years Ago, online book, based on the memories of Robert Walsh.