Demetrius Smith said he paid $500 (£367) for an ID used by Mr Kelly, then 27, to wed Aaliyah, who was under age.
Mr Smith was giving evidence after he was granted immunity from prosecution.
Mr Kelly is on trial accused of sexual abuse, racketeering and bribery. He has denied the charges.
Speaking at the singer's trial on Friday in Brooklyn, New York, Mr Smith said the decision to obtain the document was made by Mr Kelly's "associates" after Aaliyah had said she was pregnant.