Magnitz was left seriously injured after a brutal attack on a street in Bremen by a gang of masked men, an attack police said is politically motivated and have called on witnesses to come forward.
His party said early that Magnitz had been ambushed by three masked men, beaten unconscious with a piece of wood and then kicked in the head.
Bremen, Germany's smallest state, holds a regional election on May 26, the same day as European Parliament elections in which AfD hopes to make gains.
German lawmakers from the other political parties expressed their sympathy for Magnitz, wishing him a speedy recovery.
Co-leader of Germany's Left party, Dietmar Bartsch, said on Twitter: "There is no justification for such a crime."
Chancellor Angela Merkel's spokesperson, Steffen Seibert, said he hoped the culprits would be caught soon.