A supramolecular gel based on dynamic covalent acylhydrazone bonding assembled from small molecules has been reported. The gel shows aggregation-induced emission for selective and sensitive Cu2 and subsequent CN- detection.