  We introduce a family of quasisymmetric functions called {\em Eulerian
quasisymmetric functions}, which specialize to enumerators for the joint
distribution of the permutation statistics, major index and excedance number on
permutations of fixed cycle type. This family is analogous to a family of
quasisymmetric functions that Gessel and Reutenauer used to study the joint
distribution of major index and descent number on permutations of fixed cycle
type. Our central result is a formula for the generating function for the
Eulerian quasisymmetric functions, which specializes to a new and surprising
$q$-analog of a classical formula of Euler for the exponential generating
function of the Eulerian polynomials. This $q$-analog computes the joint
distribution of excedance number and major index, the only of the four
important Euler-Mahonian distributions that had not yet been computed. Our
study of the Eulerian quasisymmetric functions also yields results that include
the descent statistic and refine results of Gessel and Reutenauer. We also
obtain $q$-analogs, $(q,p)$-analogs and quasisymmetric function analogs of
classical results on the symmetry and unimodality of the Eulerian polynomials.
Our Eulerian quasisymmetric functions refine symmetric functions that have
occurred in various representation theoretic and enumerative contexts including
MacMahon's study of multiset derangements, work of Procesi and Stanley on toric
varieties of Coxeter complexes, Stanley's work on chromatic symmetric
functions, and the work of the authors on the homology of a certain poset
introduced by Bj\"orner and Welker.
