Two analogues of rofecoxib, 2‐Pyr‐ROF and 2‐Pip‐ROF, were designed according to the strategy of heterocyclic ring enlargement and facilely synthesized in a facile manner by Knoevenagel reactions. The first compound, 2‐Pyr‐ROF, had low quantum yields (QY) of 3.0% in the solid states. After replacing the pyrrolidinyl with piperidinyl, the resulting 2‐Pip‐ROF had a significantly increased QY, with a value of 28%. The root‐mean‐square deviation (RMSD) values between S0 and S1 of 2‐Pyr‐ROF and 2‐Pip‐ROF in tetrahydrofuran were 0.51, 0.35 Å, respectively. As compared with 2‐Pyr‐ROF, compound 2‐Pip‐ROF exhibits a smaller RMSD, which indicates a lower non‐radiative transition rate. A single‐crystal X‐ray diffraction study and Hirshfeld surfaces analysis revealed that 2‐Pip‐ROF had a more nonplanar molecule structure and a weaker π‐π interaction, which might result in a higher fluorescence intensity and QY. Owing to its better aggregation‐induced emission (AIE) behavior, compound 2‐Pip‐ROF showed more multi‐functional applications, including mechanochromism, acidochromism, and lipid droplets imaging ability. These results imply that the strategy of heterocyclic ring enlargement provides a new paradigm for the design of new luminogens with AIE properties.