The reinstatement was in accord with the Supreme Administrative Court’s ruling which decided that the removal of Mr Thawil from his NSC post was unlawful.
Paradorn Pattanatabut, current NSC secretary general, will exchange jobs with Mr Thawil as adviser to the Prime Minister.
Both appointments will be submitted to the Election Commission for approval after which a royal endorsement is required.
The reinstatement must be completed within 45 days as set by the court.
Mr Thawil earlier petitioned the Administrative Court, seeking justice for the unfair transfer by the Yingluck Shinawatra government.