A third police officer overpowered the suspect, identified only as Hicham D. The suspect was shot in the leg but his injury isn't life-threatening, according to the Federal Prosecutor's Office.
The third officer was "slightly injured," according to a statement from the prosecutor's office.
"In the framework of the terrorist attack against two police officers in Schaerbeek, a house search was conducted today at the residence of the suspect Hicham D, situated in Schaerbeek, Avenue de la Reine," the statement said.
No weapons were found in the search in Belgium's capital city. The office declined to release further details related to the search.
The injured police are "not in a life-threatening condition," the prosecutor's office said.
A 17-year-old French high school student, Stan Racine, witnessed the attack.
"The suspect pulled out a knife and attacked a policeman, and hurt him in the stomach and leg," he told CNN. "The policeman then pulled out his pistol and shot the suspect in the leg."
Racine said the suspect then shouted something in what he believed was Arabic.
Separately, the city's Gare du Nord railway station was closed for an hour because of a bomb alert, Reuters reported, adding that operations resumed after bomb disposal teams checked the area.
Social media users posted pictures of the overcrowded station after the scare, as well as the police presence outside the building.
The attack comes as the city remains on a high terror alert at level three, one below the highest level.
Suicide bombers struck the city's airport and a subway station
on March 22, killing 32 people and injuring more than 300.
Experts have said that Brussels has become a hotbed of terror in Europe. The alleged mastermind of the Paris attacks in November last year, which killed 130 people, was arrested in Belgium.
The offender will face a judge specializing in terrorism cases to decide on any detention details, the prosecutor's office said.