Sócrates – Sócrates Brasileiro Sampaio de Souza Vieira de Oliveira – who has died after suffering an intestinal infection aged 57, was one of the most unlikely of Brazil's resplendent footballers. Bearded and seemingly indestructible, he stood 6ft 3in tall, once admitting: "I am an anti-athlete. I cannot deny myself certain lapses from the strict regime of a sportsman. You have to take me as I am."

He was, in fact, a formidable attacking midfielder, prominent in two World Cups in the 1980s, initially a centre forward but, for most of his international career, a dominating figure in every sense, in central midfield. He smoked incessantly, rather like Gérson, a previous general of the Brazilian midfield, he drank large quantities of beer, and if, eventually, such indulgences may have caught up with him, they never seem to have impinged on his extensive football career.

The first child of a self-educated father, who named three of his sons after Greek philosophers, Sócrates was born in Belém, the city on the banks of the Amazon estuary and capital of the north Brazilian state of Pará. But it was in Ribeirão Preto, 290km (180 miles) north-west of São Paulo, that Sócrates played with the Botafogo club (1974-78). The greater part of his career (1978-84) was spent with the Corinthians club of São Paulo.

In his early days there, he was notably unwilling to join in the wild celebrations of his team-mates when he scored a goal (of which there were 172 over the course of 297 matches); so much so that the fans complained to the club president. He, in turn, begged Sócrates to be more demonstrative, and he obliged, kneeling on the ground, throwing up his arms and invoking success from whatever gods there might be.

Though he may have seemed to trot unhurriedly about the ground, Sócrates could suddenly accelerate. When the ball was in the air, his great height and a notable leap made him irresistible, and he had a fierce right-footed drive. Taking penalties was his forte, though, strangely enough, he was not often used by the Brazilian national team to execute them.

Altogether he played 60 games for Brazil from 1979, scoring 22 goals. Telê Santana, the Brazil manager, made him captain of the team. In this role he was known for encouraging his team-mates with word and flamboyant gesture rather than criticising them.

In the 1982 World Cup finals in Spain, Brazil opened against Russia in Seville, deploying a midfield of tremendous talent. Against the Russians, Sócrates was ubiquitous and outstanding, now in the firing line, now dropping deep to cover for the attacking left back, Júnior. After 75 minutes, he struck the equaliser with a fulminating right-footed shot and Brazil went on to win 2-1. In their next match, won 4-1 against a Scotland team which, like Russia, had actually taken the lead, Sócrates neatly set up Brazil's fourth goal for his fellow midfielder, Falcão. In a second-round group match that his team, in Barcelona, was unlucky to lose to Italy, Sócrates scored another spectacular goal. Receiving a perfectly angled pass from Zico, he somehow found a gap between Italy's goalkeeper, Dino Zoff, and the near post, a shot of tremendous power which found its billet. But Brazil, which needed only a draw to reach the semi-finals, lost 3-2 and went out in one of the most dramatic games in the history of the tournament.

There had been suggestions that Sócrates would cut short his playing career, but he was still in the Brazilian team, now captained by Edinho, for the 1986 World Cup in Mexico. The heroes of midfield, however, Sócrates somewhat wearily among them, were largely tired or injured and there were ructions at the training camp. In Guadalajara, against Spain, Sócrates scored another World Cup goal, though this one looked offside, after the centre forward, Careca, had shot against the bar. That came eight minutes from the end and gave Brazil a 1-0 victory.

Brazil improved: Northern Ireland were swept aside 3-0 and, again in Guadalajara, Sócrates was for once deputed to take a penalty from which he duly scored, in a 4-0 victory against Poland. Should he have taken the vital penalty, on the same ground, in the quarter-final against France? But Zico took it and missed, and Brazil were eliminated on penalties, with Sócrates one of the non-scorers. At the time, Sócrates struck me as "strolling about the field in samba rhythm – never hurried, always inventive, occasionally breaking into a brisk trot". It was his last World Cup match, and he went out with the flourish of having two headers saved by the French goalkeeper, Joël Bats.

Though he had once said, in 1981, that he would never play in Italy for money, Sócrates did, in fact, join Fiorentina in the 1984-85 season. The 1986-87 season saw him back in Brazil, in Rio de Janeiro, playing for Flamengo, and from there he went to Santos, back in the São Paulo state league, in 1988-89. There was also a 12-minute cameo appearance with Garforth Town against Tadcaster Albion in a Northern League match in 2004, but he was clearly a decade too old to play. It smacked of a publicity stunt.

Sócrates's younger brother, Raí, was a Brazilian international midfielder and a member of the Brazil squad that won the 1994 World Cup.

Sócrates is survived by his wife and six children.

Gavin McOwan writes: Sócrates was one of the few qualified medical doctors to play the game at the very highest level, captaining Brazil in the 1982 World Cup, widely recognised as one of the best teams (along with Hungary in 1954 and Holland in 1974) never to win the tournament. His style of play was unmistakable: elegant and effortless almost to the point of nonchalance, and with a penchant for the back-heel that prompted Pelé to remark that Sócrates played better going backwards than most footballers going forward.

He also possessed an intellect that complemented his name. I was lucky enough to interview "The Doctor" in 2002 and was awed by his wisdom and good humour – not to mention the number of beers he could knock back. He was clearly one of football's great sages, but also held court on everything from his surreal meeting in the Libyan desert with Colonel Gaddafi (who urged Sócrates to run for Brazilian president) to his love of Ché Guevara.

But for Brazilians who lived through the 21 years of the country's military dictatorship, Sócrates will also be remembered as a social activist and campaigner for democracy, both within the game and on the wider political stage.

While a player at Corinthians, he co-founded the Corinthians Democracy movement, an idealistic but effective political cell that fought against the authoritarian way the club's management controlled its players, a microcosm of the way the country was governed by the military. Sócrates, together with team-mate Wladimir, organised the players to discuss and then vote with a simple show of hands on all matters that affected them, from simple things such as the time they would eat lunch to challenging the dreaded concentracão, a common practice in Brazil during which players are practically locked up in a hotel for one or two days before a game.

After winning battles within football, Corinthians Democracy broadened, using football's popularity as a catalyst to strive for political change. In November 1982, despite warnings from the Brazilian football association, the players wore shirts with "Vote on the 15th" printed on the back, urging the public to take part in the upcoming elections that were one of the first moves towards ending the dictatorship.

At a time when most people were still afraid to speak out against the regime, Sócrates politicised football; and he was as proud of his team's valiant contribution in helping dismantle the dictatorship as he was of his considerable football achievements. At the end of 1982, Corinthians won the São Paulo state championship with "Democracia" printed on the back of their black shirts. Sócrates told Alex Bellos, the author of Futebol (2002), that it was "perhaps the most perfect moment I ever lived. And I'm sure it was for 95% of [my teammates] too."

• Sócrates (Sócrates Brasileiro Sampaio de Souza Vieira de Oliveira), footballer, born 19 February 1954; died 4 December 2011