A Tunisia Football Federation statement said the 69-year-old would take over from Leekens, who quit last month over an unpaid 2015 Africa Cup of Nations bonus.
It will be a second spell in charge of the Carthage Eagles for the silver-haired former Poland midfielder, who helped his country finish third at the 1974 World Cup in then West Germany.
80,000 crowd including then President Nelson Mandela.
He has also coached the national teams of Mali (twice), Ivory Coast, Morocco and Senegal.
His last African post was handling Mali and he left when the Eagles were eliminated after the first round of the 2015 Cup of Nations following a coin toss.
Mali and Guinea finished second with identical group records and there was much criticism at the method used to decide which team accompanied Ivory Coast to the knockout stage.
Tunisia were ranked fourth in Africa this month by FIFA, have qualified four times for the World Cup, and won the 2004 Cup of Nations at hosts.
The first competitive assignment for Kasperczak will be a 2017 Cup of Nations qualifier in Liberia during September.