An extended Maxwell viscoelastic model with a relaxation parameter is studied from mathematical and numerical points of view. It is shown that the model has a gradient flow property with respect to a viscoelastic energy. Based on the gradient flow structure, a structure-preserving time-discrete model is proposed and existence of a unique solution is proved. Moreover, a structure-preserving P1/P0 finite element scheme is presented and its stability in the sense of energy is shown by using its discrete gradient flow structure. As typical viscoelastic phenomena, two-dimensional numerical examples by the proposed scheme for a creep deformation and a stress relaxation are shown and the effects of the relaxation parameter are investigated.