Cudworth was born in Darlington, County Durham on 12 January 1817, the second of three children born to William Cudworth and Mary I'Anson (born 18 November 1785, Darlington). His parents were Quakers, and had married in 1810; William Cudworth was a grocer and druggist, whilst Mary I'Anson's family name was of Scandinavian origin. James Cudworth's elder brother William was a civil engineer, and worked for the Stockton & Darlington Railway; William's son William John, also a civil engineer, worked for the North Eastern Railway.
James Cudworth married Priscilla Poulter on 15 May 1848, at the Friends meeting house, Dover, Kent but they had no children. After Cudworth's retirement, the couple moved to Reigate, Surrey in about 1879, where he died on 22 October 1899. Cudworth Road in South Willesborough, a suburb of Ashford, Kent was named after him.
Cudworth was apprenticed to Robert Stephenson & Co Ltd from March 1831. After completing his apprenticeship, he became a chargehand at Stephenson's, before being appointed Locomotive Superintendent of the Great North of England Railway in February 1840.
On 22 May 1845, Cudworth was appointed Locomotive Superintendent to the South Eastern Railway, which was in the process of leaving the Brighton, Croydon and Dover Joint Committee; this committee (and its predecessor the Croydon and Dover Joint Committee) had handled all SER locomotive affairs since March 1842, as well as those of the London & Croydon Railway, and, since March 1844, the London & Brighton Railway.
The committee had shared maintenance facilities for the three railways, but on its dissolution, it was necessary for the SER to provide its own workshops. Cudworth was given the task of establishing suitable facilities, his salary being increased from £350 to £500 per annum. Repair shops were built near the terminus at Bricklayers' Arms, but the site was cramped. In February 1846, 185 acres (75 ha) of land were bought at Ashford, Kent, and in October 1847, Ashford railway works began repairing locomotives.
In 1845, he built the 2-2-2 locomotive White Horse of Kent, which was constructed on the uniflow principle. Cudworth's early locomotives were on the Stephenson long-boilered principle. White Horse of Kent was not a success, being described by Daniel Gooch as unsafe. It was later converted to a 2-4-0. In 1850, Ashford Works completed a small locomotive which had been part-assembled at Bricklayers' Arms, but the first engines entirely constructed at Ashford Works were 2-4-0s for the Hastings Line, which were placed in service during 1853–4. These engines were known as the 59 class. In 1847, the SER purchased a number of 4-2-0 Cramptons from Tulk & Ley, Whitehaven, Cumberland. In 1849, Cudworth converted four long-boilered 4-2-0s to Cramptons in an effort to improve their riding.
By 1855, Cudworth started to introduce more conventional steam locomotives. Fifty three 0-6-0 goods engines were constructed at Ashford Works between 1855 and 1876. The engines were double framed, with 16" x 24" cylinders. A number of these engines were rebuilt twice, firstly by Cudworth and later by Stirling. The engines gave over 40 years service on the South Eastern Main Line. In 1857, Cudworth introduced a class of 2-4-0s. Forty eight were built by contractors, and 68 were built at Ashford Works between 1857 and 1875. Many of them were rebuilt by Stirling. These engines also gave many years service on the SER.
In 1861, Cudworth introduced a class of 2-2-2 express passenger locomotives with 7 feet (2.13 m) diameter driving wheels. These engines gave over 20 years service on the boat trains serving Folkestone and Dover, finally being replaced in 1884 by Stirling's F class 4-4-0s. Cudworth was also responsible for the introduction of the 0-4-4T wheel arrangement for steam locomotives to English railways, with his 235 class of 1866.
Cudworth had three main achievements on the SER: he planned the layout of Ashford Works and brought it to such a standard that the company was able to begin production of its own locomotives in 1853; with two of his classes (the "Standard Goods" 0-6-0 of 1855 and the 118 class 2-4-0 of 1859), practised locomotive standardisation on a scale unheard of on other contemporary railways; and, at a time when coke (a smokeless fuel, but expensive) was normal for railways, designed a successful coal-burning firebox.
In 1874, Cudworth was appointed Locomotive Engineer of the SER, with Alfred Watkin, son of SER chairman Sir Edward Watkin appointed Locomotive Superintendent at a salary of £500. Cudworth was not one who was disposed to toe Watkin's line, which put a strain on their relationship. In 1876, Watkin persuaded John Ramsbottom of the London & North Western Railway (LNWR) to design a number of 2-4-0 passenger engines for the SER, unbeknown to Cudworth. Orders were placed with Sharp, Stewart of Manchester and Avonside of Bristol for ten engines each. The locomotives were very similar to the LNWR's Precedent Class locomotives. Known as the Ironclads, they replaced the Singles on the boat trains for a short time, but were quickly relegated to less prestige duties and the Singles resumed their former role. When Cudworth found out about the engines, he was furious and resigned. It was considered by many on the Board of the SER that Cudworth had been sacked.
Since the Rainhill Trials in 1829, it had been appreciated that the smoke emitted by burning coal was a nuisance. Railway companies accepted the need to burn coke (a smokeless fuel) in their locomotives, but this was much more expensive than coal, and several locomotive engineers sought an effective method by which coal could be burned smokelessly. Cudworth was one of these; he designed a firebox which was able to burn coal with little smoke, patenting it in 1857. The main feature of this firebox was a longitudinal water-filled vertical partition (known as a mid-feather), which required two firedoors to be provided; the grate was also longer and steeper than normal. The idea was that when one side had burnt down, it could be stoked whilst the other side was at peak temperature and consuming its smoke. The mid-feather terminated towards the front of the firebox, so that the gases from the fresh coal in the cooler side of the firebox could be completely burned by the heat given off by the hotter side. It worked well, and when independently tested (by D. K. Clark) against the designs of Joseph Beattie and James McConnell, was more efficient, burning less coal than the other two types for the same amount of work done. Unfortunately it was expensive both to construct and to maintain, which was to prove its downfall. When other engineers later produced cheaper solutions, Cudworth preferred to stick with his own design rather than change.
Few other railways adopted this firebox; but the South Eastern's close neighbour, the London, Chatham & Dover Railway (LCDR), used it between 1861 and 1869 for 68 of their engines, whilst it was also used by their other neighbour, the London, Brighton & South Coast Railway. The LCDR also found the firebox expensive: some locomotives ordered in July 1860 were costed at £150 extra (equivalent to £12,707 in 2015) for the Cudworth firebox with 8-foot (2.4 m) grate; and when a revised order was prepared in February 1861, with a 6-foot (1.8 m) grate, the firebox was costed at £20 less (equivalent to £1,683 in 2015) than the 1860 order. In February 1868, the LCDR's Locomotive Superintendent, William Martley, replaced the Cudworth firebox of one locomotive with a different design of coal-burning firebox (one with a brick arch and deflector plate, which had been developed by the Midland Railway), which had fewer complicated joints. In April 1869 he reported that the Cudworth type cost £23-2-3d per year (equivalent to £1,925 in 2015) in maintenance, whilst the type with a brick arch cost £4-18-6d (equivalent to £410,287 in 2015), and as a result, he gave instructions for the replacement of all Cudworth fireboxes when the locomotives next became due for heavy repairs. Between 1869 and 1876, all LCDR locomotives which had been fitted with the Cudworth firebox had these replaced by the brick-arch type, which was not only cheaper to maintain but had lower first cost.
The class letters were allotted by James Stirling in September 1879. Classes without such a letter were either extinct, or in the process of withdrawal at that date.