Wei finally passed the highest levels of the imperial examination in 1843. As a result, new official duties limited his work as an independent, reform-minded scholar.
Unfortunately for Wei, life as a high level mandarin was difficult. With the Taiping Rebellion raging, the erstwhile reformer Wei took the very conservative step of retiring to spend his last years in a Buddhist Monastery.
Wei passed away at his retreat in Hangzhou in 1857, leaving behind a very important body of scholarly work, including some of the earliest explorations of “the encroaching Western world,” which would have a profound influence on the reformers that followed him.