In this paper we determine a classification of the endomorphisms of the Artin group A[Dn] of type Dn for n≥6. In particular we determine its automorphism group and its outer automorphism group. We also determine a classification of the homomorphisms from A[Dn] to the Artin group A[An−1] of type An−1 and a classification of the homomorphisms from A[An−1] to A[Dn] for n≥6. We show that any endomorphism of the quotient A[Dn]/Z(A[Dn]) lifts to an endomorphism of A[Dn] for n≥4. We deduce a classification of the endomorphisms of A[Dn]/Z(A[Dn]), we determine the automorphism and outer automorphism groups of A[Dn]/Z(A[Dn]), and we show that A[Dn]/Z(A[Dn]) is co-Hopfian, for n≥6. The results are algebraic in nature but the proofs are based on topological arguments (curves on surfaces and mapping class groups).