Minaj, 36, gave the news to her 20 million Twitter followers, although she had not previously said she was either pregnant or married.
"I've decided to retire & have my family. I know you guys are happy now. To my fans, keep reppin me, do it til da death of me," the singer wrote.
Minaj said in June she planned to marry boyfriend Kenneth "Zoo" Petty, and in August she changed her Twitter name to Mrs.Petty but did not say whether a wedding had taken place.
The 'Starships' singer burst onto the music scene 10 years ago with her first album Pink Friday and is known for her outspoken comments, feuds with other singers, colourful wigs and alter egos.
One of only a handful of female rappers, she won six American Music Awards, became a controversial judge on American Idol and was included on 2016 Time 100 list of the most influential people in the world.
Minaj's fans were stunned by the news.
"She really just up and left," said a fan called MICAH on Twitter.