Dunkley, 25, made 52 appearances in all competitions for Oxford last season but rejected a new contract and will join Wigan on 30 June on a free transfer.
The former Crewe and Hednesford Town centre-back joined the U's from Kidderminster Harriers on loan before signing permanently in 2015.
He is new manager Paul Cook's first signing since arriving on 31 May.
Find all the latest football transfers on our dedicated page.
Wigan Athletic have signed defender Chey Dunkley on a three-year deal from League One rivals Oxford United.