An important heavyweight fight is scheduled to headline the UFC's Aug. 8 show.
Lewis (23-7, 1 NC) has won his past two fights. He most recently defeated Ilir Latifi via unanimous decision in February.
Following the victory, Lewis spoke about a potentially career-threatening health issue he was dealing with, but his team recently told ESPN that the issue, which they wanted to keep private, was cleared up, thus opening the door for his return.
Oleinik (59-13-1) also has won two in a row. He most recently defeated Fabricio Werdum via split decision in May.
Russia's state news agency Tass first reported on the agreement.
The fight marks Weidman's return to middleweight after he moved up to light heavyweight in October. Weidman, a former UFC middleweight champion, lost his 205-pound debut to Dominick Reyes last year and then decided to move back down to the middleweight.
Akhmedov (20-4-1) is unbeaten in his past six fights.
The event, which has yet to be officially announced by the promotion, is expected to take place in Las Vegas.
Information from ESPN's Brett Okamoto was used in this report.