In a wide-ranging interview with Billboard magazine, the musician was asked about the disproportionate number of non-white people targeted by US drug enforcement policies.
"What it has become is not a war on drugs. It has become slavery. Or something crazier," Minaj said.
"When I see how many people are in jail, I feel like, 'Wait a minute. Our government is aware of these statistics and thinks it's OK?'. The sentences are inhumane.
"I love the president for trying to be a voice for people who no other person has ever tried to be a voice for."
She added that it melted her heart when President Obama visited a prison and spoke to people imprisoned for up to 50 years for drug offences.
Minaj continued: "There are women who are raped, people who are killed and [offenders] don't even serve 20 years. I was blown away, watching the footage of him speaking to the prisoners.
"They never felt like anyone in the White House cared about them. I loved that he made them people again.
"Because we all make mistakes. I think about how many men may have made a mistake to feed their families and then had to pay for it forever."
Back in 2010, Minaj spoke out against the idea that hip-hop artists had to sell drugs to be considered credible artists.
"At one point you had to sell a few kilos to be considered a credible rapper," she told Rolling Stone at the time.
"But now it's like Drake and I are embracing the fact that we went to school, we love acting, we love theatre, and that's okay - and it's especially good for the black community to know that's okay, that's embraced."