Now for a fortnight previous to the night on which he designed to escape, James made it his habit to play at hide-and-seek every evening after supper with his brother and sister, and the children of the officers then located in the palace; and in such secure places did he secrete himself that his companions frequently searched for over half an hour without discovering him. This of course accustomed the household to miss him, and was cunningly practised for the purpose of gaining time on his pursuers when he came to be sought for in good earnest.
At last the eventful night fixed for his escape arrived; and after supper a pleasant group of merry children prepared to divert themselves in the long dark halls and narrow winding passages of the grim old palace. James, as usual, proposed concealing himself, and leaving his companions for the purpose, disappeared behind some arras; but, instead of hiding, he hastened to his sister's chamber, where he locked up a favourite dog that was in the habit of following his footsteps wherever he went, and then noiselessly slipped down a back stairs which led to an inner garden. Having taken care to provide himself with a key fitting the garden door, he quickly slipped into the park.
Here he found Colonel Bamfield waiting, who, giving him a cloak and a wig for his better disguise, hurried him into a hackney coach, which drove them as far as Salisbury House in the Strand.
From thence they went through Spring Garden, and down Ivy Lane, when, taking boat, they landed close by London Bridge. Here entering the house of a surgeon friendly to their adventure, they found a woman named Murray awaiting them, who immediately provided a suit of woman's wearing apparel for the young duke, in which she helped to attire him. Dressed in this costume he, attended by the faithful Bamfield, hastened to Lion Quay, where they entered a barge hired for their conveyance to a Dutch frigate stationed beyond Gravesend.
Meanwhile, the children not being able to discover their playfellow in the palace, their elders became suspicious of the duke's escape, and began to aid the search. Before an hour elapsed they were convinced he had fled, and St. James's was thrown into a state of the utmost excitement and confusion.
Notice of his flight was at once despatched to General Fairfax at Whitehall, who immediately gave orders have all the roads from London guarded, especially those leading to the north; for it was surmised he would in the first instance seek to escape into Wales. The duke, however, had taken a safer course, but one which was not unattended by danger. He had not sailed far in the barge when its master became suspicious that he was aiding the escape of some persons of consequence, and became frightened lest he should get into trouble by rendering them his services. And presently his surmise was converted into certainty; for looking through a cranny of the barge-room door, he saw the young woman fling her leg on the table and pull up her stocking in a most unmaidenly manner. He therefore at once peremptorily declared to Colonel Bamfield they must land at Gravesend, and procure another boat to carry them to the ship; for it would be impossible for the barge to pass the block-house lower down without being observed, and consequently inspected, as was the custom at this troubled time. On hearing which Colonel Bamfield was filled with dismay; but, knowing that at heart the people were loyal towards the Stuarts, he confided the identity of his passenger, and begged him not to betray them in this hour of peril. To give his appeal further weight, he promised the fellow a considerable sum if they safely reached the frigate; for human nature is weak, and greed of gold is strong. On this, the bargee, who was a loyal man, promised he would help them to the best of his powers; the lights were therefore extinguished, the oars drawn in, and, the tide fortunately answering, the barge glided noiselessly down under cover of night, and passed the block-house unobserved. In good time they reached the frigate, which, the duke and Colonel Bamfield boarding, at once set sail, and in a few days landed them at Middleburgh. James proceeded to the court of his sister, the Princess of Orange, and later on joined his mother in France.
At the age of twenty he served in the French army, under Turenne, against the Spanish forces in Flanders, and subsequently in several campaigns, where he invariably showed himself so brave and valiant that the Prince de Conde declared that if ever there was a man without fear, it was James, Duke of York. Now it happened that in 1658 the Princess of Orange went to Paris in order to visit the queen mother, as the widow of Charles I. was called. The Duke of York was in the gay capital at this time, and it soon became noticed that he fixed his attention overmuch on one of his sister's maids of honour, Anne Hyde. This gentlewoman, then in her twenty-first year, was the possessor of a comely countenance, excellent shape, and much wit. Anne was daughter of Edward Hyde, a worthy man, who had been bred to the law, and proved himself so faithful a servant to Charles I., that his majesty had made him Privy Councillor and Chancellor of the Exchequer. After the king's execution, in 1649, the chancellor thought it wise for himself and his family to seek refuge in exile, and accordingly joined Charles II., with whom he lived in the closest friendship, and for whose return he subsequently negotiated with General Monk.