"The party's parliamentary group took this decision today," party secretary Amanda Lind told TT.
Emma Norén will replace Stålhammar until a permanent replacement is appointed.
The Green Party is the junior partner in Sweden's coalition government.
Stålhammar provoked criticism in the past week for a Facebook post in which she accused party members of "messing her about" in parliamentary procedures.
She went on to accuse members of inappropriate contact with "a certain foreign country," which amounted to a security threat, she said.
Stålhammar has since distanced herself from the post, and party leaders have concluded that the allegations were unfounded.