By King Ryder was introduced to the notice of Sir Robert Walpole, who immediately discerned his merits. Ryder entered parliament as member for St. Germans in March 1733, and in the following November was appointed solicitor-general. He was elected for Tiverton on 27 April 1734, and gained an interest in the borough, which his family maintained till the first Reform Bill. In the spring of 1737 he became attorney-general, and was knighted in May 1740.
In 1738 he was designed as successor to Sir Joseph Jekyll [q. v.], master of the rolls, but the appointment, though actually announced, did not take place, owing mainly to Ryder's disinclination to accept it. As first law officer he was a frequent speaker in the House of Commons, but usually confined himself to legal questions. He never engaged in political intrigues. Ryder's first important parliamentary duty was to take charge of the bill of pains and penalties against the city of Edinburgh which followed the murder of Captain John Porteous [q. v.] (Parl. Hist. x. 274–5). In 1741 he spoke in support of the bill which was to give justices of the peace the right of authorising impressment (ib. xii. 26). Horace Walpole mentions a speech made by Ryder in January 1742 as ‘glorious’ (Walpole to Mann, 22 Jan. 1742). In 1744 the attorney-general had to move the suspension of the Habeas Corpus Act in view of the threatened Jacobite rebellion; and his ‘greatest effort’ in parliament, in Lord Campbell's opinion, was his speech in favour of the unpopular bill attainting the sons of the Pretender should they land in England, and making it high treason to correspond with them. At ‘enormous length but with very considerable ability’ he proceeded to justify the provision in the same bill by which the property of rebels' children was declared forfeit (Parl. Hist. xiii. 859–66). In 1747 he unsuccessfully opposed, on the principles of free trade, a bill prohibiting insurances on French ships during the war (ib. xiv. 128). In 1751 he had to defend the restrictions to be imposed on the Princess of Wales as regent (ib. p. 1023). His last speech in parliament was an able advocacy of Lord Hardwicke's marriage bill (ib. xv. 1 &c.). Walpole told a correspondent that Ryder ‘did amply gossip over’ the bill, and that during one of the debates he came into conflict with the speaker (Arthur Onslow), who gave him ‘a flat lie’ (Walpole to Hon. H. S. Conway, 24 May 1753).
Ryder prosecuted for the crown the captured rebels of '45. Walpole, in describing the impeachment of Lord Lovat, characterised Ryder as ‘cold and tedious,’ though a much better lawyer than Murray, the solicitor-general (to Sir H. Mann, 20 March 1747). In 1753 Ryder met with a rebuff in a case of some constitutional interest. In that year he prosecuted a bookseller named Owen for libelling the House of Commons in a pamphlet reflecting on its conduct in committing to Newgate the Hon. Alexander Murray (d. 1777) [q. v.] Pratt, afterwards Lord Camden, was for the defence. The jury, refusing to confine themselves to the proved fact of publication, returned a verdict of not guilty in the face of Ryder's strongly expressed views of the dignity and privileges of the House of Commons. After the trial he had to conceal himself from the mob in the lord-mayor's closet, and to give them money to drink the health of the jury before his coach was allowed to pass down Fleet Street to his house in Chancery Lane. The popular triumph was celebrated in a song, said to have been composed by an Irish porter, in which the attorney-general was addressed:
Sir Doodley, Sir Doodley, do not use us so rudely,
You look pale as if we had kilt ye;
Sir Doodley, Sir Doodley, we shamefully should lye
If we say the defendant is guilty
(Lond. Mag. 1753). On 2 May 1754 Ryder was made lord chief justice of the king's bench. He also became a privy councillor. It was not then the practice to create the lord chief justice a peer immediately on his appointment, and Ryder remained a commoner. Two years later Newcastle proposed his elevation, and on 24 May 1756 the king signed a patent creating Ryder Baron Ryder of Harrowby, and the chief justice was to have kissed hands on the following day. On 25 May, however, he died suddenly. A memorial was presented to George II in favour of inserting the name of his son in the patent, but in the midst of the existing political crisis the matter was overlooked.
Lord Waldegrave sums up Ryder's character as that of ‘an honest man and a good lawyer, but not considerable in any other capacity.’ Horace Walpole was of much the same opinion, declaring that he ‘talked himself out of all consideration in parliament by laying too great stress on every part of his diffusive knowledge.’ In private life Ryder was amiable but somewhat uxorious. He corresponded daily with his wife, a cultivated woman, who managed all his money matters as well as his household affairs.
Ryder was buried at Grantham, Lincolnshire, where there is in the church a marble