British authorities took the sample from Assange in Ecuador's London embassy where he is taking refuge, the South American country's chief prosecutor Galo Chiriboga said.
Assange, 45, has been in the embassy since 2012 to avoid being sent to Sweden where he faces the rape allegations, which he denies.
He fears Sweden would extradite him to the United States to answer for the leaking of diplomatic cables by his whistleblowing website, which embarrassed Washington.
An Ecuadoran state attorney questioned Assange at the embassy on November 14 on behalf of a Swedish prosecutor who was also present.
On that occasion, “Mr. Assange presented a document stating that he had already handed over the DNA sample to the British police,” Chiriboga told reporters in the Ecuadoran capital Quito.
“Therefore Sweden will now have to request that DNA sample from the British police.”
He said Ecuadoran prosecutors would send the official transcript of Assange's evidence from the November 14 hearing to Swedish authorities “in mid-December.”