A newly designed crosslinked polyaniline (CPAN) was developed and preliminarily used to fabricate a sensor for determination of ascorbic acid (AA). The nanostructured copolymer was confirmed through surface morphology studies (SEM). The amperometric response of electrodes toward AA based on crosslinked polyaniline (CPAN) is far more than that of linear polyaniline (LPAN), which exhibits improved electrocatalytic oxidation of AA. The linear range of the promising sensor is from 5.0 × 10−6 to 1.13 × 10−2 M with a lower detection limit of 1.67 × 10−6 M (S/N = 3) as well as good selectivity, stability and reproducibility.