An ellipsometric biosensor, to be used in the detection of mercuric ions that affect the vital organs of living organisms, was developed. In this context, as a diagnostic element of the developed ellipsometric biosensor, a nucleic acid-based aptamer that is highly selective for mercuric ions (Hg2+) was used. Two different aptamers, a long and straight sequence, and a hairpin-structured oligonucleotide sequence were chosen. The detection sensitivity obtained by both aptamers was 0.237 degrees/mu M and 0.211 degrees/mu M, respectively. The detection limit was 0.89 pM Hg2+ and 187 nM Hg2+ for linear- and hairpin-type oligonucleotide, respectively.