The simulation of flows of viscoelastic fluids is a very challenging domain from the theoretical as well as the numerical modelling point of view. In particular, all the existing methods have failed to solve the high Weissenberg number problem (HWNP). It is therefore clear that new tools are necessary. In this thesis we propose to tackle the problem of the simulation of viscoelastic fluids presenting memory effects, which is the first attempt of applying the lattice Boltzmann method (LBM) to this field for non-trivial flows. A theoretical development of the discrete models corresponding to the equations of mass, momentum conservation and of the constitutive equation is presented as well as the particular treatment of the associated boundary conditions. We start by presenting a simplified case where no memory but shear-thinning or shear-thickening effects are present : simulating the flow of generalized Newtonian fluids. We test the corresponding method against two-dimensional benchmarks : the 2D planar Poiseuille and the 4:1 contraction flows. Then we propose a new model consisting in solving the constitutive equations that account for memory effects, by explicitly including an upper-convected derivative, using the lattice Boltzmann method. In particular, we focus on the polymer dumbbell models, with infinite or finite spring extension (Oldroyd-B and FENE-P models). Using our model, we study the periodic (simplified) 2D four-roll mill and the 3D Taylor-Green decaying vortex cases. Finally, we propose an approach for simulating flat walls and show the applicability of the method on the 2D planar Poiseuille case. Two of the advantages of the proposed method are the ease of implementation of new viscoelastic models and of an algorithm for parallel computing.