The court in the southern state of Minas Gerais on Tuesday ordered the knife to be given to the National Police Academy museum in Brasilia, in response to a request by federal police.
"There are no doubts about the relevant historical value of the knife used in the attack against the president," judge Bruno Savino said in his ruling.
The judgement also handed "swabs impregnated with biological samples" from both Bolsonaro and his attacker to the museum.
The same judge in June ordered Adelio Bispo de Oliveira -- who stabbed the then-candidate during a campaign rally on September 6 last year -- to be held indefinitely in a prison mental facility.
In an Instagram post, the president's son Senator Flavio Bolsonaro compared the attack on his father with the September 11, 2001 attacks on the United States, which killed almost 3,000 people.
"18 years ago, an attack on the United States impacted the entire world: the attack on the twin Towers. A year ago, Brazil suffered an attack on democracy: @jairmessiasbolsonaro was stabbed in the middle of a public event. Two episodes that impacted society and left marks in history."