Outgoing President Dmitry Medvedev submitted the bill in response to widespread protests against his ally, Prime Minister Vladimir Putin, ahead of the election in March that gave Putin a third term as president.
Putin had scrapped direct elections of provincial governors during his presidency, in a move seen as a rollback of democracy.
The 450-seat State Duma approved the bill on April 25 with 237 votes, just 11 votes more than the simple majority required.
The new bill envisions presidential consultations with the candidates or the parties nominating them.
Opponents say the new law still allows the president to screen out undesirable candidates.