The 20-year-old trained with the Millers earlier this summer having spent last season on loan at Cheltenham Town.
The former West Ham United youngster moves to New York Stadium for an undisclosed fee, putting pen to paper on a deal which will keep him at the club until 2019.
"It is great to be back and I am really pleased that everything is sorted," he told the club's official website.
"I am now really looking forward to the challenge and I can't wait to get started. It is a massive opportunity and it is up to me to take it with both hands. Speaking to manager has been very positive and I am really looking forward to it.
"The training ground looks great, the pitches are excellent and all the lads have been great. The environment has been really welcoming, I've got along with everyone since I joined here, so I can't wait to get going."
The player made 24 appearances for Cheltenham last season to help the Robins avoid relegation from the Football League.
Onariase could make his debut for Rotherham when they take on Portsmouth in League One on Saturday.