Also, according to the historian Watt in his book "The History of Islamic Theology" (p.92), he supported two other Hashemite leaders, Muhammad Nafs Zakiyyah and his brother Ibrahim, in their attempts to get the leadership from Mansur, and because of this, Abu Hanifah was imprisoned by Mansur and then poisoned, causing his death.
According to the following site, he was even tortiured for supporting the Hashemites:
According to the Preface of "Al Muwatta" of Imam Malik (written by Mazheruddin Siddiiq), Imam Malik was "flogged in public until he bled white" by the governmental authority of Mansur, because he issued a fatwa that the khalifate should go to Muhammad Nafs Zakiyyah. He still refused to bow to the wishes of the rulers, and never recognized the legitimacy of the non Hashemite government. It is perhaps for this reason that the Hashemite Kingdom of Morocco (which is Maliki) continues to this day.
Funny how most Sunnis get upset and call you a Shi-ite if you say Hashemites should be our leaders, even though their Imams had that same view.