O'Shaughnessy served in the armies of France in the hope that Irish support would enable James II, or his successors, regain the throne of Britain and Ireland. He was present at the siege ofMontmelian ; with the French army in Italy ; and fought at the Battle of Marsaglia in 1693. At the conclusion of the siege of Valenza in 1696, he was promoted to Commandant of the Third Battalion of the Regiment of Clare. The Peace of Ryswick brought an end to the War of the League of Augsburg in 1697. This meant the disbanding of two of the regiment's three battalions, though O'Shaughnessy was kept on, been appointed captain of the regiment's Grenadiers. With the outbreak of the War of the Spanish Succession, the Regiment of Clare re-recruited and served in the German theatre during the opening years of the war. He was present at the following actions at this time: Kehl, Munderkingen and the first battle of Blenheim, all in 1703. The following year saw the defeat of the French at the second battle of Blenheim. However, Clare and the other Irish regiments performed with honour in the, with one commentator stating "It was the regiment of Clare that sustained the retreat of the French army, and thus covered itself with glory." The Regiment performed a similar task two years later at the Battle of Ramillies, preventing the Dutch and English from completely wiping out the army. The regiment lost thirty-eight officers and three hundred and twenty-six soldiers out of a total of eight hundred men. Because of the death of regimental Major O'Carroll, O'Shaughnessy was promoted to that rank with effect 4 July 1706, and in September to lieutenant-colonel. He and his men fought at Oudenaarde, Malplaquet and other engagements until the end of the war in 1714. In April 1721 he became a Brigadier and made Marechal de Camp in 1735. Though now in his sixties he continued to participate actively in battle till the years prior to his death. He was appointed commander of the garrison at Gravelines in 1743 but died two months later in January 1744. Opposing him at the Battle of Malplaquet was Sir Thomas Prendergast, 1st Baronet, who had been granted O'Shaughnessy's Irish lands. Prendergast was killed in this battle.
Personal life
Major-General O'Shaughnessy was of the Uí Fiachrach Aidhne dynasty, making him a direct descendant of Fiachrae mac Eochaid Mugmedon. He married Maire Jacqueline Francoise de Gauville on 15 February 1729 at Aire-sur-la Lys. They had no children. His mother, Lady Helen, died at Fiddaun Castle in 1729, after which it was abandoned. His cousin successor as The Ó Seachnasaigh, Bishop Colman O'Shaughnessy, O.P. of Ossory, who died in 1748, tried in vain for decades to recover their lands from Sir Thomas Prendergast and his heirs, but without success. He in turn was succeeded by Robuck O'Shaughnessy, and lastly by Robuck's son, Joseph, who died about 1780. With the death of Joseph O'Shaughnessy, the senior line of the family apparently died out. The register of death of the church of Saint Willibrord, Gravelines, states that:
On 2 January 1744, there died in the communion of our mother church, having had the holy sacraments administered to him Missire Guillaume O Shaughnussy, knight of the order of St. Louis, lieutenant-colonel of the Irish regiment of Clare, marechal de camps et armess of the king, employed at Gravelines in the service of his majesty; he was a native of Gort-inchygory, county Galway, province of Conought in Ireland, aged seventy years, married to Dame Maire Jacqueline Gauville. He was inhumed in the chancel of the church by me, cure and dean, on the fourth of this month, in the present of John Baptist de Lalande, brigadier of the king's armies and the king's lieutenant at Gravelines, Monsieur Thomas Maguire, captain of the regiment of Clare, and of James O Shaughnussy, cadet in the defunct's company and his relative;