The electrochemical behaviors of melamine (MEL) were studied at paraffin-impregnated graphite electrode in PBS (pH 7.0) and 0.5 M H2SO4. Various methods including UV–vis thin-layer spectroelectrochemistry, infrared spectra (IR) and electrochemicatry have been performed to investigate the characteristics. In 0.1 M PBS (pH 7.0), MEL loses two electrons to form a dication, which couples head-to-head with a neutral molecule of MEL to form a dimer accompanying the production of azocompound, the dimer plays a role of a monomer in the following polymerization. In 0.5 M H2SO4, unstable MEL mostly hydrolyzes to form ammeline, ammelide, s-triazine-2,4,6-trion, and tricyanic acid, respectively; The hydrolysis could be accelerated by electrochemical method; Meanwhile, MEL associates tricyanic acid to give a plane molecule cake by hydrogen bonding. The spectra responses of MEL at 205 and 234 nm are linearly increasing in a same concentration range of 1.0 × 10−7–1.0 × 10−5 M in 0.5 M H2SO4 (determination limit, 1 × 10−8 and 3 × 10−8 (3σ)). The proposed method was successfully applied to the determination of MEL in real sample.