Venezuela’s opposition held secret talks with members of President Nicolás Maduro’s inner circle in recent months in an ill-fated bid to get Mr. Maduro to leave power and install a united interim government, according to U.S. officials and Venezuelan opposition figures.

The talks involved the highest levels of Mr. Maduro’s regime, including Defense Minister Gen. Vladimir Padrino, Supreme Court Chief Justice Maikel Moreno and the presidential guard commander and head of military intelligence, Gen. Iván Rafael Hernández. The...