Marcus Jordan -- Michael Jordan's son -- has entered into an agreement with prosecutors to close out his DUI case ... and part of the deal includes a stipulation where he must write an apology letter to one of the cops he berated during his arrest.
Court documents TMZ Sports has obtained show on Sept. 12, Marcus signed a pretrial intervention contract in Orange County, Fla. with the goal of having his criminal charges dismissed.

According to the docs, Marcus must meet multiple conditions over the next 12 months .