The Uruguay international got hurt in the early minutes of his country's 1-0 defeat to Iran in a friendly on Friday.
Araujo returned to Barcelona and tests done confirmed damage to his adductor longus tendon.
Barca said in a statement: "The first team player Ronald Araujo will undergo surgery on Wednesday for the adductor longus tendon avulsion he has in his right thigh. The operation will be carried out by Dr. Lasse Lempainen, under the supervision of the Club's medical staff, in Turku, Finland. When the operation is completed there will be another medical statement."
The 23-year-old was reluctant to undergo surgery with the World Cup less than two months away, but after talking to Barcelona coach Xavi Hernandez and club doctor Ricardo Pruna on Monday morning, the player has decided to have the operation.
By undergoing surgery, there is less probability of a relapse. However, it will take longer to recover than if Araujo opted for a conservative treatment.
Barcelona center back defended his decision to undergo thigh surgery in a statement posted on Twitter.
"After consulting with several doctors, we decided that surgery was the best option", he wrote.
"I love my country and I love my national team. It's not about choosing one or the other, it's about health and being 100% as soon as possible. On a personal level, these are tough moments and I want to say thanks to everyone for all the support I'm receiving.''
Among the games Araujo will miss is the league Clasico against Real Madrid on Oct. 16.
Araujo will undergo surgery on Wednesday in Turku, Finland, with renowned surgeon Dr. Lasse Lempainen, under the supervision of the club's medical services, who previously operated on Barcelona's Ousmane Dembele and Sergi Roberto.
Once the operation is completed, Barcelona and Araujo will have a better understanding of the recovery time. However, he is likely to be sidelined from 10 to 12 weeks.
Uruguay begin their World Cup campaign on Nov. 24 against South Korea.