Very little is accurately known of James's career before his entry into the East India Company's service. He was born in Pembrokeshire in humble circumstances, and went to sea at an early age. According to one account, he served in Hawke's ship, but, wherever his training was received, it had made him a first-rate seaman. In 1747, he entered the Company's marine service, being then about twenty-six years of age.
In 1751, he sailed from England in command of the _Guardian_ sloop, one of the two men-of-war built by the Directors for the protection of Bombay trade. His services against the coast pirates, during the next two years, procured his advancement to the post of Commodore at Bombay, and it was soon remarked that the sailing of the _Protector_, on which his flag was now hoisted, had greatly improved by the changes he had made. By his capture of Severndroog, now to be related, he became famous. He played his part at the capture of Gheriah, and, in the following year, when the news of the disaster at Calcutta became known in Bombay, he was sent down in the _Revenge_, with four hundred men, to join the force sent up from Madras under Watson and Clive. Off Calicut he encountered the French ship _Indien_, carrying twenty-four guns and over two hundred men, and captured her. He afterwards joined the board of Directors, was created a baronet, had a seat in Parliament, and, in time, became chairman of the Company. Sterne, in the last year of his life, formed a close friendship with Mr. and Mrs. James, and, a few days before he died, recommended his daughter Lydia to their care.
On the 22nd March, 1755, James sailed from Bombay in the _Protector_, forty guns, having with him the _Swallow_, sixteen guns, the _Viper_ bombketch, and the _Triumph_ prahm. The following day, he sighted an Angrian squadron of seven grabs and eleven gallivats, which he chased for a couple of hours without success. Two days later, he was joined off Chaul by the Peishwa's fleet, consisting of seven grabs, two batellas, and about forty gallivats. To James's annoyance, he found his allies in no hurry to get on. Twice they insisted on landing, lingering for over three days in one place. On the 29th, Severndroog was sighted, and Angria's fleet of seven grabs and ten gallivats was observed coming out. The signal to chase was made, but obeyed with little alacrity by the Peishwa's people, though experience had shown that they could outsail the Bombay ships. James gave chase with his little squadron, his Mahratta allies being left, by evening, hull down, astern. The Angrians made prodigious exertions to escape, hanging out turbans and clothing to catch every breath of air. All the following day the ineffectual chase continued, the _Protector_ outsailing its own consorts, and losing sight altogether of its Mahratta allies. Finding it useless to persevere, James hauled his wind, and stood to the northward for Severndroog, which he had left far behind in the chase. Here he found Ramajee Punt, who had landed a few men, and entrenched himself at about two miles from the nearest fort, with a single four-pounder gun.