The funding is based on conditions including detailed development and financial plans and leasing a super-hanger at St Athan.
The firm will build its new DBX model from 2020.
The new plant will employ 750 highly-skilled workers.
The information commissioner instructed the Welsh Government to release the details of the financial support given to the company.
Ministers had initially refused to make the figure public.
This was challenged through the Freedom of Information Act by businessman Tom Gallard.
The Â£5.8m is "repayable business finance" according to the details released by the Welsh Government.
Wales beat off more than 20 other countries to secure the deal, which was announced early last year.
Mr Gallard, who runs a tech company, said: "I'm happy the Welsh Government has now released this information. It is an important principle that we must know how public funds are being spent."
Aston Martin is receiving Â£5.8m in financial support from the Welsh Government as part of the deal to bring the luxury carmaker to the Vale of Glamorgan, it has been revealed.