Euler primes have been actively studied as special prime numbers, and their properties are deeply related to the class number of the corresponding quadratic field. A univariate polynomial ring over a field has a similar algebraic structure to the ring of rational integers. For a quadratic extension of a univariate rational function field, its class number is defined. Then, by investigating class numbers, we consider that we can construct polynomials which have certain similar properties to Euler primes. In this paper, we analogically give a formulation of Euler primes for a univariate polynomial ring over a field, and give special polynomials which are viewed as such Euler primes.