Alkylation reaction byproducts, particularly HCl, strongly affect the framework of MOF-5 catalyst, with an unusual structural transformation. Despite this, the highly desirable catalytic performance in terms of high conversions and selectivity toward the less bulky para-oriented products is maintained.