Born the son of Dr James Deans and Janet Deans, James Deans, as he then was, joined the Royal Navy in March 1799. He initially joined the third-rate HMS Kent and took part in the Anglo-Russian invasion of Holland in Autumn 1799 during the War of the Second Coalition. In 1802 he saw action in combat with the French ship Duguay Trouin and was also involved with the capture of La Vautour. Promoted to lieutenant on 25 May 1805, he joined the fifth-rate HMS Cambrian and took part in capturing three privateers that year. After serving for a few weeks as flag-lieutenant to Admiral The Hon. George Berkeley on the North American Station and having been promoted to commander on 8 October 1806, he was given command of the fifth-rate HMS Rosamond but was injured while putting out a fire at Copenhagen Dockyard shortly after the capture of that City in August 1807. Promoted to captain on 13 October 1807, he briefly took command of the fifth-rate HMS Cambrian. Following his marriage to Janet Dundas he assumed the surname of Dundas in April 1808. Dundas was given command of the third-rate HMS Stately, flagship of Rear AdmiralThomas Bertie, in the Baltic Fleet in March 1809. He took command of the third-rate HMS Venerable in January 1812 and then the frigate HMS Pyramus in September 1812 and in the latter ship captured two more privateers. He took command of the armed frigate HMS Tagus in the Mediterranean Fleet in August 1815 and then the first-rate HMS Prince Regent, as flag captain to Admiral Sir William Parker who was commanding on the coast of Portugal, in 1830. Entering politics, Dundas became Whig Member of Parliament for Greenwich at the 1832 general election and, having also become Deputy Lieutenant of Berkshire on 16 June 1834, he sat in Parliament until he stood down at the 1835 general election in favour of a fellow Whig. He was then given command of the first-rate HMS Britannia, as flag captain to Admiral Sir Philip Durham who was Commander-in-Chief, Portsmouth, in 1836. He became Member of Parliament for Devizes in February 1836 in place of Sir Philip Durham who had stood down as Member of Parliament for that constituency. He then resigned his seat in Parliament when he became Clerk of the Ordnance on 21 March 1838. He was appointed a Companion of the Order of the Bath on 25 October 1839. Having been elected Member of Parliament for Greenwich again at the 1841 general election, Dundas became Fourth Naval Lord in the Second Melbourne ministry in June 1841 but stood down in September 1841 when the Government fell from power.
On 2 April 1808, he married his first cousin, Janet, only daughter and heiress of Charles Dundas, later Lord Amesbury. His first wife died in April 1846 and, in August 1847, he married Lady Emily Moreton, fourth daughter of Thomas Reynolds-Moreton, 1st Earl of Ducie. By his first wife, he had a life interest in large estates in Flintshire and Berkshire – centred on Aston Hall in Flintshire and Barton Court at Kintbury in Berkshire – which, at his death, passed to his grandson, Mr. Charles Amesbury Deans Dundas.