The pupil, named locally as Bailey Gwynne, was taken to Aberdeen Royal Infirmary by ambulance after police were called to Cults Academy around 1.30pm.
Doctors were unable to save him and he died in hospital later this afternoon.
Police have launched a murder investigation and are now questioning another 16-year-old who was detained over the incident.
The pupil, named locally as Bailey Gwynne, was taken to Aberdeen Royal Infirmary by ambulance after police were called to Cults Academy around 1.30pm
A boy lays flowers at the gates of Cults Academy following the tragic incident at the Aberdeen school
Mourners at the gates of Cults Academy tonight after a teenager was stabbed at the school
Injury: A pupil at Cults Academy, pictured, has reportedly died after an incident at the school in Aberdeen
The 16-year-old was injured after being stabbed in a school corridor by another pupil.
Police Scotland said in a statement: 'Police Scotland can confirm that following a serious incident at Cults Academy this afternoon that sadly a 16-year-old boy has died.
'The next of kin of the victim have been informed. An extensive investigation is underway and a 16-year-old male has been detained in relation to the incident and is assisting police with enquiries.'
Chief Inspector Graeme Mackie added: 'This is a shocking and extraordinary incident for Aberdeen and firstly our thoughts are with the family and friends of the boy who has sadly lost his life today.
'A full and thorough enquiry is underway has been launched and there will be a police presence in the area for the foreseeable future.
'We are working closely with the education authorities and wider community as I am sure this incident will be felt not only in Aberdeen but much further afield.'
Bailey Gwynne, pictured right, was stabbed at lunchtime today at his school in Aberdeen
Police: Officers at the entrance to the school in the wake of the incident this afternoon
Witness Alexander Lees, 22, a former pupil who now works next door to the school, said: 'The staff car park was locked up, which it never is, and the police weren't answering questions.
'There were about four cars and a van, and after the pupils left 11 or 12 police officers walked out to the police van. Apparently it happened on the elevated walkway where people walk between classes.'
Parents arriving at the school today to find out what was happening were not allowed to enter the site, which was in lockdown.
Around 12 police cars, a dogs van, a riot van and a rapid response ambulance were at the scene in the wake of the incident.
A police van enters the grounds of Cults Academy as investigations at the school continue tonight
Parents arriving at the school today to find out what was happening were not allowed to enter the site, which was in lockdown
Locals today spoke of their shock at the reports of violence at the school, which was named Scottish State Secondary of the Year in 2008
One woman, who did not want to be named, said everyone was shocked and all the parents were 'panicking'.
Local resident Richard Karasek, who lives opposite the school, spoke of his shock.
He said: 'We've lived opposite the school for 15 years or more and never really had much of a problem with noise or anything here. But this is awful.
'All my three children went to Cults Academy and Cults Primary too. Nothing like this has happened before, I am sure there's been altercations with teenage boys but nothing like this.'
The 62-year-old said he arrived home from work to find the police carrying outside investigations inside the school building.
He said: 'It's very alarming. It is not something you would expect. The biggest question is why would somebody go to school with a knife in the first place.
'It is an isolated incident albeit a very tragic one. Two families lives have been ruined - it's terrible.'
Cults Academy, located in an affluent suburb of Aberdeen, is a six-year comprehensive school with about 1,050 pupils
One woman, who did not want to be named, said everyone was shocked and all the parents were 'panicking'
The school will be closed for the rest of the week as police continue their investigation.
Headteacher Anna Muirhead told a press conference at the school this evening: 'Pupils and staff are in a state of total shock. The boy involved was a very gentle, caring pupil, with a lot of friends.
'I think it's fair to say the whole school community is totally devastated.
'At the moment of course our thoughts are all with the boy's close family and his friends and what they must be going through at this tragic time.'
A council spokesman added: 'It is with shock and sadness that we can confirm that a pupil of Cults Academy has died following an incident at the school earlier today.
'Our heartfelt sympathies are extended to the friends and family. We will be providing support to pupils, teachers, parents and the community in the coming days.
'Police Scotland is on site and they will provide further updates as required.'
Shock: Parents gathered at the school but were not allowed to enter by police
Cults Academy, located in an affluent suburb of Aberdeen, is a six-year comprehensive school with about 1,050 pupils.
Locals today spoke of their shock at the reports of violence at the school, which was named Scottish State Secondary of the Year in 2008.
David MacPherson, 50, a minister at the Free Church of Scotland whose three children all studied at the school, said: 'This isn't typical of Cults.
'It's quite a quiet, affluent area. I can't remember anything like this ever happening around here - let alone of this magnitude.'
Ewan McIntosh wrote on Twitter: 'Devastating to hear that a student at Cults Academy in Aberdeen has been stabbed, and died this afternoon. Thoughts with the community.'
Another tweeter added: 'Unreal about a boy dying after being stabbed at Cults Academy today. Who takes a knife to school? Absolutely unbelievable.'
Aberdeen FC midfielder Kenny McLean said: 'Tragic news about the young boy from Cults Academy! Thoughts with his family.'
Paralympic gold medallist Neil Fachie, from the Granite City, posted: 'Really sad news in Aberdeen today. Can't imagine how the family are taking the news.'
Tragedy: The boy was reported to have died this afternoon after the incident at school
Scotland's First Minister, Nicola Sturgeon, said on Twitter: 'All my thoughts are with the family & friends of the young man who has tragically died at Cults Academy today.'
Holyrood's Education Secretary Angela Constance said: 'I'm deeply saddened by this terrible news and my thoughts are with the pupil's family and friends.
'Aberdeen City Council has arranged for support to be available to the school's pupils and teachers. We remain in close contact with the council and stand ready to provide any help that may be needed.
'As this is a live police investigation we are unable to comment further at this stage.'
An Aberdeen City Council spokeswoman said: 'It is with shock and sadness that we can confirm that a pupil of Cults Academy has died following an incident at the school earlier today.
'Our heartfelt sympathies are extended to the friends and family. We will be providing support to pupils, teachers, parents and the community in the coming days.'
Investigation: Police at the scene of the incident, which was reported to be a stabbing
Tributes flooded in for the schoolboy on social media, including on this picture from his Instagram account
Gayle Gorman, Director of Education and Children's Services at Aberdeen City Council, said: 'On behalf of Aberdeen City Council, we extend our condolences to the family and friends of the young man involved.
'In order to support the police investigation, the school will be closed tomorrow and Friday, and we will be offering every support to our pupils, their families and our staff.'
Cults Parish Church has opened its doors tonight for people in the community to come together and pray following the incident.
Rt Rev Dr Angus Morrison, Moderator of the General Assembly of the Church of Scotland, added: 'It is with a great sense of shock and sadness that I heard the news of the terrible tragedy that took place today at Cults Academy in Aberdeen.
'It is hard to take in that an incident resulting in the death of a teenager could occur during the course of a day in one of Scotland's schools.
'My prayers and the prayers of all of us in the Church of Scotland go out to the family and friends of the 16-year-old victim as well as to the pupils of the school and their families during this time of terrible sadness and grief.'
Aberdeen City Council has set up a dedicated support number for those affected by the incident. The number, which becomes active at 8am tomorrow is 01244 264299.