If it weren't for the fact that Somalia is even considered a country, some circles believe it shouldn't be considered as such unless at least a stable shadow of a government is present, it wouldn't even be on this list.
The state and the officials, however they are, are so infested with the malice of corruption and brutal violence that it is ranked at the very last among the countries in the world, and by some circles, it is not even considered a country.
The corruption and violence was sparked when the US and the USSR used Somalia as a battleground for the political ideologies and backed clans and militias into fighting for their respective sides. Funding from the US really kicked off the particular Siad Barre regime which took corruption to a whole new level.
Since the oust of the regime in 1991, Somalia has been essentially lawless and has no government except for parts being governed and fought over by different clans and militias and the coastal areas are riddled by pirates.
Their CPI is the lowest 1 and for that, Somalia earns the top spot in being the most corrupt country in the world as of 2012.