The aide to President Hamid Karzai of Afghanistan at the center of a politically sensitive corruption investigation is being paid by the Central Intelligence Agency, according to Afghan and American officials. Mohammed Zia Salehi, the chief of administration for the National Security Council, appears to have been on the payroll for many years, according to officials in Kabul and Washington. It is unclear exactly what Mr. Salehi does in exchange for his money, whether providing information to the spy agency, advancing American views inside the presidential palace, or both. Mr. Salehi's relationship with the C.I.A. underscores deep contradictions at the heart of the Obama administration's policy in Afghanistan, with American officials simultaneously demanding that Mr. Karzai root out the corruption that pervades his government while sometimes subsidizing the very people suspected of perpetrating it. Other prominent Afghans who American officials have said were on the C.I.A.'s payroll include the president's half brother, Ahmed Wali Karzai, suspected by investigators of playing a role in Afghanistan's booming opium trade. Over the course of the nine-year-old war, the C.I.A. has enmeshed itself in the inner workings of Afghanistan's national security establishment. From 2002 until just last year, the C.I.A. paid the entire budget of Afghanistan's spy service, the National Directorate of Security.