Crofton Infants’ School on High Street took over a former caretaker’s house, which was owned by Wakefield District Housing (WDH).
They then refurbished the building, which is next to the school, to create a new library.
The development also includes an extension to the school’s nursery, a new kitchen area and a number of new small teaching rooms.
Former chief education officer for Wakefield, John McLeod, officially opened the new facilities on Wednesday.
Headteacher Helen Padwick said: “It is really positive for our school and the renovation has definitely been worth the investment.
“We had been in long negotiations with WDH to take over the building once it became empty. I had always wanted to create a library for the children and it is a fantastic addition to our school.”
Mr McLeod, the school’s governors and teachers were among the guests at the official opening.
Mrs Padwick said the teaching rooms will be used by individual pupils or groups for studying and the children can use the kitchen area to learn about healthy eating.
She added: “I came to the school 12 years ago and when John was working in Wakefield, I discussed my vision of renovating the caretaker’s house with him.
“He saw the beginning of the dream and came to see the renovation completed.
“The event was really nice and it was a celebration of the school finishing the project.”