Haitian-American rapper Prakazrel "Pras" Michel, 46, and Low Taek Jho, 37, were accused of conspiracy and other charges in the four-count indictment unsealed on Friday.
Low, also known as Jho Low, is a key figure in what is known as the 1MDB scandal, which has rocked Malaysian political and financial circles.
The presidential candidate receiving the contributions was not identified in the indictment and was referred to only as "Candidate A."
But it has been widely reported and it was clear from the indictment that it was Obama.
The indictment alleges that between June and November 2012, Low transferred $21.6 million to Michel "for the purpose of funneling significant sums of money into the United States presidential election."
Michel allegedly paid about $865,000 to about 20 "straw donors" so they could make donations in their names to a presidential joint fundraising committee.
More than $1 million was allegedly funneled to an independent committee also involved in the election.
"The object of the conspiracy was for Michel and Jho Low to gain access to, and potential influence with, Candidate A and his administration, by secretly funneling foreign money from Jho Low through Michel," the indictment said.
"To gain further access to and influence with Candidate A and his administration, Jho Low attended or arranged for his associates to attend events at the White House with Candidate A," the indictment said.
It is illegal for foreign nationals to contribute to US election campaigns.
According to the indictment, Michel and Low concealed their scheme from Obama and his campaign. Michel appeared in court in Washington on Friday and pleaded not guilty. Low remains at large and his whereabouts are unknown.
A spokesperson for Low proclaimed his innocence in a statement. "Mr. Low is innocent -- and he is presumed innocent under US law," the statement said.
"The allegations against Mr. Low have no basis in fact: Mr. Low has never made any campaign contributions directly or indirectly in the US and he unequivocally denies any involvement in or knowledge of the alleged activities."
Low has been indicted in New York in connection with the 1MDB case for allegedly conspiring to launder billions of dollars.
Huge sums were stolen from sovereign wealth fund 1MDB, allegedly by ex-prime minister Najib Razak and his cronies in a crime that stretched around the world.
Another defendant in the 1MDB case, Ng Chong Hwa, a former Goldman Sachs banker also known as Roger Ng, was extradited to the United States from Malaysia last week and pleaded not guilty in a court in New York on Monday.
Low, who was an adviser to Razak, is accused of plundering the fund to fuel a jet-setting lifestyle which included expensive yachts, purchases of multi-million dollar properties and lavish parties with Hollywood stars.