The $28,500 loan that Syed Rizwan Farook received from an online finance startup a few weeks before he and his wife allegedly opened fire at a holiday gathering in San Bernardino, Calif., was actually funded by Citigroup Inc., according to people with knowledge of the transaction.

The Wall Street firm bought the entire loan as part of an arrangement in which Citigroup agreed to buy hundreds of millions of dollars worth of loans from Prosper Marketplace Inc., with the intention of packaging them into securities, the people...