The 28-year-old has also denied trying to evade police in the centre of Edinburgh on May 14, 2001.
It is alleged that Lothian and Borders Police officers found the striker carrying the Class A drug before he ran away from them.
The Scotland international was not present in court and submitted his plea via a letter.
O'Connor was recently named by Channel 4 show Dispatches as one of many footballers to have failed a drugs test for cocaine.
His trial is due to take place at the Edinburgh Sheriff Court in February next year.