Kirkby was born the fourth child and second son of Richard Kirkby, a justice of the peace and Member of Parliament for Lancaster, and his second wife, Isabel, daughter of Sir William Hudleston of Cumberland. He joined the Royal Navy and passed his naval lieutenant's examination on 28 March 1689. He was then appointed as second lieutenant of HMS Advice. He had powerful relatives, including Arthur Herbet and Sir John Lowther, the latter being one of the Lords Commissioners of the Admiralty. They secured a promotion to captain on 12 February 1690, with his first appointment being to the hired ship HMS Success. He was sent as part of the fleet to capture St Kitts, returning to England in April 1692.
Kirkby spent the fourteen months after his return without a ship to command, but was finally appointed to HMS Southampton in 1694 and served in the Mediterranean under the command of Edward Russell. The first signs of his aversion to fighting were noticeable in a fight between two French vessels on 18–19 January 1695. It was noticed that
‘kept as far off’ the heavily armed Content ‘as his guns could reach reasonably firing now and then 2 or 3 guns at him’
He was consequently excluded from a share in the resulting prize money. Further problems were also apparent aboard the Southampton. Her chaplain, Ellis Cooper, left the ship after some unrecorded unpleasantness with Kirkby. Further punishments were meted out, the boatswain was broken and flogged for disobedience and insolence, and a seaman was sentenced to be flogged and ‘towed ashore’ for ‘scandalous actions’. The Southampton, still with Kirkby in command, was then sent to the West Indies in 1696, being present at the burning of Petit-Goâve on 28 June 1697. Kirkby returned to England in 1698, where he was tried by court martial on charges of embezzlement and cruelty, accused of punishing a seaman for straggling by ordering him to be ‘tied up by the right arm and left leg for several hours’ The board cleared him, but Kirkby did not receive another command and spent the next two years without a ship and on half pay. Kirkby blamed this on ‘the great power and interest of my Lord of Orford’ (Edward Russell).
Lowther was probably responsible for securing his return to active service, after Kirkby had written a number of letters pointing out this perceived injustice:
And since their said Lordships have supplied the said ships with officers without respect to seniority or circumstance, there not being nine of the thirty one that are elder in command than I, and the rest being my junior officers, have most of them, if not all been paid off a considerable time, since the ship I lately commanded was discharged. Therefore My Lords, I humbly request in consideration of my service in command, between nine and ten years, in all which time I have not proved guilty of any miscarriage to the detriment of his Majesty's service, but have on the contrary been especially instrumental in several actions in the late war contributing to his Majesty’s and Country’s service, that your Lordships will please to allow my title to seniority, that I may be no longer oppressed by the advancement of my juniors to my prejudice.
In February 1701 Kirkby was appointed to command HMS Ruby in the West Indies. He moved to HMS Defiance in March that year, and was second in command of Vice-admiral John Benbow's squadron which carried out a five day long skirmish with a French squadron off St Mary under Jean du Casse, an action later known as the Action of August 1702. Kirkby refused to obey Benbow's orders to close and engage the French, leaving only Benbow and two other ships to face the French alone. The English were eventually beaten off, Benbow being mortally wounded in the process. Kirkby personally came aboard Benbow's flagship, HMS Breda to dissuade him from continuing the action. He went as far as to draft a letter, signed by the other captains, calling for Benbow to abandon the action. The English returned to Port Royal, Jamaica.
On their return, Benbow had Kirkby and the other captains arrested for cowardice and disobedience, and tried them by court-martial. Over two dozen officers testified against him, stating that he had not encouraged his men to fight but dodged behind the mizzenmast ‘falling down on the deck at the sound of a shot’. The trial found Kirkby and another captain guilty of cowardice and disobedience and sentenced them to death. Kirkby wrote a letter to the secretary of the Admiralty, Josiah Burchett, claiming that the defeat had instead been caused by Benbow's injudicious and ignorant conduct. He accused Benbow of falsifying his evidence and threatening those who wanted to defend Kirkby. He also alleged that the court had been adjourned so that he could not present evidence in his defence. The Admiralty did not agree, and after Queen Anne had declined to intervene in the sentences, Kirkby and Captain Cooper Wade were transported to England by Captain Edward Acton.
They arrived in Plymouth on 15 April, with the executions scheduled to take place the next evening. Kirkby was described as
‘very calm and easy, not railing or reviling, but forgiving all the world and praying, for the Queen's health and prosperity’
He had written his own account of his actions, and drew up his will, leaving everything to his sister Elizabeth. The execution was to be carried out aboard HMS Bristol, in the presence of assembled officers. Two parsons came ‘to pray and give the sacrament’ to Kirkby and Wade. The execution took place at 6 pm. Kirkby was ‘kneeling on the larboard side of the forecastle’ facing the six musketeers appointed to shoot him. He lifted his hand as ‘a signal to be shot’. After he had been shot, his body was placed in his coffin, ‘being by him’. It was then taken to shore and buried under the communion table in Charles’ Church, Plymouth.