The sandwich had been aimed at the city's then leader, Leung Chun-ying, who was on his way to vote in the September 2016 legislative election, but it missed and hit the officer.
Defendant Avery Ng of the League of Social Democrats denied one count of common assault at a magistrates' court hearing. He could face jail if found guilty.
The hearing follows the recent arrests of prominent pro- democracy activists, including a former lawmaker, that have renewed anti-China sentiment.
"Suddenly I saw an unknown object coming from in front flying towards me," police officer Lau Wing-kwan told the court as a witness, adding Leung had quickly ducked.
More From This Section
"Because the item was wet and soft, after I blocked it, it came apart and parts of it hit my vest," Lau said, adding it left brown stains.
Leung is expected to testify Wednesday afternoon.
In a Facebook video taken after the incident that was played in court, Ng had described the missile as a "smelly fish sandwich".
The face of the movement, Joshua Wong, was sent to prison in August for his role in the initial demonstration along with fellow protest leaders Nathan Law, a former lawmaker, and Alex Chow, after the Court of Appeal overturned previous non- custodial terms for the trio.
Their jailing was a blow to the pro-democracy campaign and seen as more evidence that Beijing was tightening its grip on Hong Kong.
Authorities vehemently denied there was political interference in the court decision, while thousands of protesters on Sunday called for the resignation of the city's justice secretary.