The defending MotoGP champion crashed out late in the season-opening race on home soil on Sunday and was hit by his bike after a huge highside.
Marquez travelled to Barcelona and went under the knife at the Hospital Universitari Dexeus on Tuesday.
The 27-year-old, winner of six MotoGP titles, will remain in hospital for up to 48 hours after having a titanium plate fitted in his right arm, his Repsol Honda team confirmed.
Dr Xavier Mir did not touch Marquez's radial nerve during the procedure and although the Spaniard is aiming to return this season, it is too soon to know when he will be back in action.
Meanwhile, team manager Alberto Puig also revealed LCR Honda rider Cal Crutchlow had undergone surgery on his wrist and could compete in the Andalucia Grand Prix this week.
Puig said: "Everyone who races in the World Championship has the unfortunate possibility of getting injured and having to go to the operating room.
"Unfortunately, it was our turn and it was Marc who has had to undergo surgery. Marc will take some time to recover but we are happy with how everything has gone.
"Doctor Mir and his team have taken care of the entire situation since the fall and performed a successful operation.
"This gives the Repsol Honda Team a lot of motivation, knowing it went well, but now we have to be patient to see how Marc recovers and to understand when he can return.
"Cal Crutchlow also had an operation that went well and in principle, his intention is to test the wrist on Friday. We are optimistic about his participation in the Grand Prix."