The 59-year-old Pillai, a 1972-batch Indian Administrative Service officer of Kerala cadre, was Officer on Special Duty in the Home Ministry before he took over his new assignment.
His name was cleared by the Appointments Committee of the Cabinet headed by the Prime Minister Manmohan Singh.
Pillai, who had a stint in the Home Ministry earlier as a joint secretary, will have a tenure of two years.
Gupta, whose tenure ended on March 31 this year, was granted a three-month extension till Tuesday in view of the Lok Sabha polls.