Delegates for the Christian Democratic Union (CDU) party adopted the new rule with 559 votes for and 409 against, with 11 abstentions, at the congress in Hanover.
From next year, women must occupy a third of leadership positions at both local and national levels, climbing to 40 percent by 2024 and then reaching 50 percent by mid-2025.
The same quotas will apply to candidate lists at general, regional and European elections.
The decision settles a debate that has agitated the party of the former chancellor Angela Merkel for several years.
Former president Annegret Kramp-Karrenbauer, who was the head of the CDU between 2018 and 2021, put forward the policy.
She encountered a lot of pushback to the proposal among the party, which was created in the immediate post-war period and whose posts of responsibility are mostly held by men.
And despite the target being passed, there is still strong resistance to quotas by many delegates who fear the policy risks appointing women solely to meet targets and not based on ability.
But CDU chairman Friedrich Merz has given his support to the goal, and emphasised that “more than 50 percent of voters are women”.
Merkel left office in 2021 after 16 years in power and was succeeded by Social Democrat Olaf Scholz at the helm of a three-way coalition with the Greens and the pro-business Free Democrats.
After losing power last year, the CDU is hoping to win in the elections in 2025.
The conservatives are currently leading in the polls, ahead of the Greens and Scholz’s Social Democrats.
Before the national vote, the CDU is also hoping to make gains in regional elections, with the next on October 9 in the region of Lower Saxony.