While the emperor did write some anti-west things, it wasn't to gather support. Emperor Kōmei was fairly firmly on the side of the Bakufu (not least because the so called "imperial loyalists" were murdering people in the capital and even fired on his palace). When the Meiji emperor took the throne, he was a teen. And by then it was clear to leaders on both sides that jōi was impossible and Japan needed to change.
Edit: But yes there definately were people who thought the government betrayed them, which contributed to the civil unrest in the early Meiji