The murder of Run-DMC DJ Jam Master Jay has been a mystery for nearly 2 decades ... but 2 men are finally in custody for the crime.

Jay was shot to death on October 30, 2002, in a recording studio in Queens, and now federal prosecutors are indicting Ronald Washington and Karl Jordan, Jr. for the crime.

The 2 men have reportedly long been suspects, but the feds finally feel they have the goods to prosecute them on charges of murder while engaged in drug trafficking ... according to the NY Times.

Federal prosecutors are expected to announce the charges some time Monday.

Washington is already serving a federal sentence for robbery, and Jordan was taken into custody Sunday.

JMJ was just 37 when he was killed.