Magistrate Deen Potter made the comments when sentencing the 16-year-old boy over burglary charges.
"Like you he came from the most tragic, traumatic circumstances," he said, "but he was able to rise above them".
The controversial hip hop star, real name Curtis Jackson, shot to fame from a life of crime, drugs and violence.
Mr Potter said the boy witnessed domestic violence plus alcohol and drug abuse in his home life in the coastal city of Geraldton.
"A lot of people don't have the personal strength to go beyond their circumstances," he said, according to the ABC.
"But for the most part you've been able to rise above it."
Indigenous people represent about 3% of Australia's population but have imprisonment rates around 12 times higher than the rest of the country.
"As a young Aboriginal man, if you end up in that system, your chances of turning your life around will only grow slimmer," Mr Potter said in sentencing remarks.
"In 10 years I want to look you up and see your successes."
The teenager was facing 49 charges after stealing property worth more than A$10,000 ($7,600; Â£6,200).
He pleaded guilty to 14 burglary charges and was sentenced to a six-month intensive supervision order and 40 hours of community service.
Mr Potter did not sentence the boy for the remaining 35 charges, leaving it to his parents to punish him appropriately.
A West Australian magistrate has suggested an Aboriginal boy use US rapper 50 Cent as a role model to avoid a potential life of crime.