KUCHING, Malaysia—Opposition leader Anwar Ibrahim is trying to pull off the biggest election shock in Malaysia's history this weekend by defeating the National Front coalition, which has ruled for more than half a century, and shaking up the country's tightly controlled, race-based politics.

Mr. Anwar has been on the brink of power before. Now 65 years old, he appeared set to become Malaysia's leader in the 1990s. Deputy prime minister at the time, he was sacked after falling out with his then-boss, Mahathir Mohamad, spending...