The no-confidence motion, which required 175 votes in the 349-seat parliament to pass, was supported by 181 lawmakers.
Lofven, 63, is the first Swedish prime minister to be ousted by a no-confidence motion put forward by the opposition. After the vote, Lofven said he would hold discussions with other parties and decide whether to resign or call snap elections within a week.