He will leave six months after a report by Her Majesty's Inspectorate of Education raised questions about the running of the education service. Fife received an average rating after inspectors pinpointed a breakdown in the relationships between the directorate and the 19 secondary headteachers.
They also criticised financial management systems and the lack of central monitoring of schools. Pupils' attainment in aspects of 5-14 testing and at Standard grade was below national averages.
In an official statement, Mr McKay, 52, said: "The council wishes to look afresh at the management structure of the education service.
"After careful consideration, I feel that after seven years at the helm of the largest service in the council, now is the right time for me to retire from Fife Council. This will allow my successor to take the lead in designing and implementing a new structure to take the service forward."
Douglas Sinclair, chief executive, said Mr McKay had led the service with "skill, distinction and imagination" and had brought "integrity, fairness and even-handedness" to the job.
The authority will begin the hunt for a replacement next month.