Nikolic led rivals Vojvodina Novi Sad in the first half of the season but has been snapped up by Partizan after Rasovic lost his job in the wake of this month's Serbian Cup quarter-final defeat by unfancied Spartak Subotica.
Rasovic came under fire before the league had even started when his team were knocked out in the Champions League third qualifying round.
Partizan were also beaten in the Europa League playoffs in August.
"We are delighted to have signed Nikolic but I have a moral obligation to say that Rasovic hasn't been sacked as he will be able to carry on in a different role if he chooses," club president Dragan Djuric told a news conference.
The 34-year-old Nikolic, who previously coached Rad Belgrade and Serbia's Under-18s, knows he will also face intense scrutiny after the 10-week winter break.
"Unfortunately we only have the league title to play for but this one will be more difficult to win than any other," he said.
"Perhaps this was not the best moment to take this job because the team needs fresh blood to come out on top in the title race but coaching Partizan is a privilege and I am really looking forward to the challenge."
The champions, chasing a record seventh successive league title, have 33 points from 15 games, one more than bitter city foes Red Star.
The season resumes on February 23 when Partizan visit sixth-placed Novi Pazar and Red Star are at home to lowly Javor Ivanjica.