Jay Lindop, from the ONS, said the majority of people over the last year came to the UK for work or study.
The government said it highlighted the challenge to reduce net migration to "sustainable levels".
It aims to get net migration down to five figures by 2020.
The net migration figure was also higher than the last provisional data, which showed the index at what was then a record 330,000 in the 12 months to March. This has since been revised up to 336,000 as well.
The ONS data revealed that:
Net migration of European Union (EU) citizens showed an increase of 42,000 to 180,000, with the number from countries outside the bloc also up 36,000 to 201,000
In all, 294,000 people migrated to the UK for work, two thirds of whom had a definite job
The number of EU nationals working in the UK stood at two million from July to September, an increase of 324,000 compared to the same quarter last year
A total of 50,000 Romanians and Bulgarians came to the UK in the year to June, a rise of 19,000; restrictions on citizens from the two countries working in the UK were lifted in January last year
Romania is now in the top five countries where those coming to the UK last lived for the first time, accounting for 6% of all immigration
Ms Lindop, head of population statistics at the ONS, said the latest figure "remains the highest on record".
`Financial incentives`
The ONS said the rise was due to a 62,000 increase in immigration to 636,000 and a 20,000 reduction in emigration to 300,000.
More than two thirds of the immigration increase was driven by EU citizens, the majority of whom came to Britain to work.
Immigration Minister James Brokenshire said the government was committed to reforms "across the whole of government" to deliver "the controlled migration system".
"Our new Immigration Bill will address illegal working, the pull factors that draw migrants to Britain and the availability of public services which help them to remain here unlawfully," he said.
"The last two set of figures show record levels of EU immigration which show why the prime minister is right to negotiate with the EU to reform welfare to reduce the financial incentives that attract EU migrants to the UK."
The Migration Observatory at the University of Oxford said asylum remained "the smallest component" of UK immigration "by some distance".
Director Madeleine Sumption said migration for work and study were "the largest categories" and said changes in net migration were "mainly being driven" by economic factors like the success of the UK economy rather than by new policies.
More about: