Charfeddine, 54, who had held his post since October 2021, told reporters he wished to thank the president for "his understanding and for allowing me to be relieved of my duties".
The minister's wife died in a fire caused by a gas leak in their home in June last year.