She met State Duma (lower house) Speaker Vyacheslav Volodin and his deputy Pyotr Tolstoy.
German officials have warned that Russia could try to influence voting in September's general election.
The AfD campaigns against what it calls the "Islamisation" of Germany.
Firebrand nationalist Vladimir Zhirinovsky - a fierce critic of Nato and Western liberals - was among the MPs who met Ms Petry. His Liberal Democratic Party is politically close to United Russia, the pro-Putin party that dominates Russian politics.
Who is Frauke Petry?
What does Alternative for Germany (AfD) want?
The AfD opposes Chancellor Angela Merkel's liberal immigration policy and her tough stance on Russia, instead calling for a new rapprochement with Moscow.
That echoes the French National Front (FN) position towards Mr Putin. FN leader Marine Le Pen has also forged links with pro-Putin Russian MPs.
Recent opinion polls suggest that the AfD could get about 11% in the September Bundestag (parliament) election. In the 2013 election the party did not reach the 5% threshold required to win seats.
The AfD is especially strong in Germany's former communist east, where many remain suspicious of liberal Western capitalism.
There is also growing concern about possible Russian interference in Western elections after US intelligence sources accused Russian hackers of breaking into Democrat and Republican computer systems.
Dutch officials have said they will count all votes in their general election next month by hand to counter the threat of hacking.
Russia was also accused of spreading fake news on influential social networks.
The Kremlin has strongly denied the US allegations.
A Duma statement about Ms Petry's talks said they covered "inter-party co-operation and developing contacts between youth organisations".
The head of the right-wing nationalist Alternative for Germany (AfD), Frauke Petry, has held talks in Moscow with MPs close to President Vladimir Putin and with Russian ultra-nationalists.