Hacker was third son of Francis Hacker of East Bridgford and Colston Basset, Nottinghamshire, by Margaret, daughter of Walter Whalley of Cotgrave. From the outbreak of the English Civil War Hacker vehemently supported the Parliamentary cause, though the rest of his family seem to have been royalists. On 10 July 1644 he was appointed one of the militia committee for the county of Leicester, the scene of most of his exploits during the Civil War, On 27 November 1643 he and several others of the Leicestershire committee were surprised and taken prisoners at Melton Mowbray by Gervase Lucas, the Royalist governor of Belvoir Castle. A month later Parliament ordered that he should be exchanged for Colonel Sands.
At the capture of Leicester by the king in May 1645 Hacker, who distinguished himself in the defence, was again taken prisoner. Hacker was nevertheless attacked for his conduct during the defence, but he was warmly defended in a pamphlet published by the Leicester committee. His services are there enumerated at length, and special commendation is bestowed on his conduct at the taking of Bagworth House and his defeat of the enemy at Belvoir, where he was in command of the Leicester, Nottingham, and Derby horse (cavalry). Hacker is further credited with having freely given "all the prizes that ever he took" to the state and to his soldiers, and with having, while prisoner at Belvoir, refused with scorn an offer of "pardon and the command of a regiment of horse to change his side". "At the king's taking of Leicester", the pamphleteer proceeds, he "was so much prized by the enemy as they offered him the command of a choice regiment of horse to serve the king". At the defeat of the Royalists at the Battle of Willoughby Field in Nottinghamshire (5 July 1648) Hacker commanded the left wing of the Parliamentary forces.
During the trial of Charles I, Hacker was one of the officers specially charged with the custody of the King, and usually commanded the guard of halberdiers which escorted Charles to and from Westminster Hall. He was one of the three officers to whom the warrant for the King's execution was addressed, was present himself on the scaffold, supervised the execution, and signed the order to the executioner. According to Herbert he treated the King respectfully.
Hacker commanded a regiment under Cromwell during the Invasion of Scotland. Cromwell wrote to Hacker, 25 December 1650, rebuking him for slightingly describing one of his subalterns as a better preacher than fighter, and telling him that he expects him and all the chief officers of the army to encourage preaching. Hacker was a religious man, but a strict Presbyterian and a persecutor of the Quakers, He confessed shortly before his death "that he had formerly born too great a prejudice in his heart towards the good people of God that differed from him in judgement". While Cromwell lived he was a staunch supporter of the Protectorate, arrested Lord Grey in February 1655, and was employed in the following year to suppress the intrigues of the Cavaliers and Fifth Monarchists in Leicestershire and Nottinghamshire. In Richard Cromwell's Parliament Hacker represented Leicestershire, but was a silent member. "All that have known me", he said at his execution, "in my best estate have not known me to have been a man of oratory, and God hath not given me the gift of utterance as to others".
During the Second Commonwealth (the unstable period preceding the Restoration) he followed generally the leadership of his neighbour Sir Arthur Haslerig, whose "creature" he was (as Mrs. Hutchinson terms him). By Haslerig's persuasion he, first of all the colonels of the army, accepted a new commission from the hands of the speaker of the restored Long Parliament, and was among the first to own the supremacy of the civil power over the army, He opposed the mutinous petitions of Lambert's partisans in September 1659, and, after they had expelled the Rump Parliament from Westminster, entered into communication with Hutchinson and Haslerig for armed opposition. After the triumph of the Rump he was again confirmed in the command of his regiment, and seems to have been still in the army when the Restoration took place. On 5 July 1660 he was arrested and sent to the Tower of London, and his regiment given to Lord Hawley. The House of Commons did not at first except him from the Indemnity and Oblivion Act, but during the debates upon it in the lords the fact came out that the warrant for the execution of the King had been in Hacker's possession. The Lords desired to use it as evidence against the regicides, and ordered him to produce it. Mrs. Hacker was sent to fetch it, and, in the hope of saving her husband, delivered up the strongest testimony against himself and his associates. The next day (1 August 1660) the Lords added Hacker's name to the list of those excepted, and a fortnight later (13 August) the House of Commons accepted this amendment.
Hacker's trial took place on 15 October 1660. He made no serious attempt to defend himself: "I have no more to say for myself but that I was a soldier, and under command, and what I did was by the commission you have read". The particulars of the share Colonel Hacker had in trial and execution, were related by Colonel Tomlinson, at Hacker's trial:
I had indeed to do with the guard; being then an officer of the army, a colonel of horse. When the King came to St. James's, it was observed by some, that there was too great an access of people admitted to the King; and within a day or two after, there was a party of halberdiers appointed for the stricter observing the guard; they were commanded by three gentlemen, of whom this prisoner at the bar was one. The orders every day for removing the person of the king were commonly directed to four persons, and those were, myself, Lieutenant-colonel Cobbet, Captain Merryman, and one more; but the guards that still went along were the halberdiers. So that every day when the King did go to Westminster, he went to Sir Robert Cotton's house, and so far I went with him, but never saw him at that pretended high court of justice. When he used to go to Westminster Hall, Serjeant Dendy used to come, and demand that the King should go to the high court of justice, and Colonel Hacker did ordinarily go with him, with the halberdiers. It was my custom to stay in the room till he came back again. These orders continued during the time of his trial. After the sentence was given, on the day whereon the execution was to be done, it was ordered, that the guards that were for the security of the person of the king should cease, when a warrant from the high court of justice for the execution should be produced.— Tomlinson.
Colonel Tomlinson further deposed, "that Colonel Hacker led the King forth on the day of his execution, followed by the bishop of London, and was there in prosecution of that warrant, and upon the same their orders were at an end". This evidence of Tomlinson was corroborated by Colonel Huncks, who stated that:
a little before the hour the king died, he was in Ireton's chamber, in Whitehall, where Ireton and Harrison were in bed together; that Cromwell, Colonel Hacker, Lieutenant-colonel Phayer, Axtel, and himself, were standing at the door, Colonel Hacker reading the warrant; but Upon witnesses' refusal to draw up an order for the executioner, Cromwell would have no delay, but stepping to a table that stood by the door, on which were pens, ink, and paper, he wrote something; which as soon as he had done, gives the pen to Hacker, who also wrote something, on which the execution of the king followed.— Huncks.
Hacker was sentenced to death, and was hanged at Tyburn on 19 October 1660. His body, instead of being quartered, was given to his friends for burial, and is said to have been interred in the church of St. Nicholas Cole Abbey, London, the advowson of which was at one time vested in the Hacker family.[a] As with all convicted traitors, his property was forfeited to the Crown. His estate passed to the Duke of York, but was bought back by Rowland Hacker, and was still in the possession of the Hacker family in 1890.