The Federal Bureau of Investigation helped facilitate a 2012 ransom payment to al Qaeda from the family of kidnapped aid worker Warren Weinstein, senior U.S. officials said, in an unsuccessful bid to secure the release of the American, who was killed in January in a U.S. drone strike.

The FBI’s previously undisclosed role reveals a contradiction in the U.S.’s longstanding position against paying ransoms for hostages. While the White House sharply criticizes the practice in public and private, new details about the Weinstein...