He enlisted in the British Army as a young man. At the age of 23, he was a sergeant in the 23rd Regiment of Foot (later The Royal Welch Fusiliers). During the Crimean War, the 23rd Foot were part of the British force sent to the Crimea. On 20 September 1854, at the Battle of the Alma, Sergeant O'Connor was advancing between two officers, carrying the Colour, when one of them was mortally wounded. Sergeant O'Connor was also shot at the same time, but recovering himself, he snatched up the Colour from the ground and continued to carry it until the end of the action, although urged to retire to the rear on account of his wounds. He also acted with great gallantry at the assault on the Redan (8 September 1855) where he was shot through both thighs.