In the food industry, ascorbic acid (AA) is widely used as an antioxidant. However, the concentration of AA is influenced by various factors, including temperature, time, and pH value during food preparation and storage, leading to its instability in content. This makes the accurate detection of AA content particularly important. Precise determination of AA content in food and pharmaceuticals is crucial for ensuring the adequate intake of essential vitamins and maintaining good health. Herein, we have developed a successful preparation method of an imidazole-based ionic liquid functionalized CDs hybrids APM-CDs. A novel photo functional hybrid probe Eu3+@APM-CDs was obtained via an ion-exchange reaction between APM-CDs and lanthanide complex Eu(DPA)3. The obtained hybrid probe was extensively characterized in detail. What's more, the results show that the fluorescent intensity of Eu3+@APM-CDs has a good linear response to AA concentrations in the range of 25–500 μM (R2 = 0.99), with a detection limit of 80 nM. The fluorescence probe demonstrates good selectivity and sensitivity toward AA and has the potential for significant application in AA detection by simplifying procedures and reducing interference from impurities.