The real d'Artagnan's life was used as the basis for Gatien de Courtilz de Sandras' novel Les mémoires de M. d'Artagnan.
Alexandre Dumas in turn used Sandras' novel as the main source for his d'Artagnan Romances (The Three Musketeers, Twenty Years After and The Vicomte de Bragelonne), which cover d'Artagnan's career from his humble beginnings in Gascony to his death at Maastricht.
Although Dumas knew that Sandras's version was heavily fictionalised, in the preface to The Three Musketeers he affected to believe that the memoirs were real, in order to make his novel more believable.

D'Artagnan is initially portrayed by Dumas as a hotheaded youth, who tries to engage the Comte de Rochefort and the three musketeers, Athos, Porthos, and Aramis in single combat.
He quickly becomes friends with the musketeers, and has a series of adventures which put him at odds with Cardinal Richelieu, then First Minister of France.
In the end, Richelieu is impressed by d'Artagnan, and makes him a lieutenant of the musketeers.
This begins his long career of military service, as detailed in the sequels.

D'Artagnan's role among the musketeers is one of leadership (his skills and brains impress the musketeers greatly), but he is also regarded as a sort of protégé given his youth and inexperience.
Athos sees him not only as a best friend and fellow musketeer but nearly as a son.
At the end of the series, his death at the siege of Maastricht is given an extra tragic twist – he is mortally wounded while reading the notice of his promotion to the highest military rank.

Some scholars believe aspects of D'Artagnan are drawn from the life and character of Dumas's mixed-race father, General Thomas-Alexandre Dumas.
The incident when D'Artagnan challenges Porthos, Athos, and Aramis to duels on the same afternoon might be based on an incident in General Dumas's youth when he was insulted; and their subsequent friendship on General Dumas's youthful companionship with fellow soldiers in the Queen's Dragoons.
The real d'Artagnan's life was used as the basis for Gatien de Courtilz de Sandras' novel Les mémoires de M. d'Artagnan. Alexandre Dumas in turn used Sandras' novel as the main source for his d'Artagnan Romances (The Three Musketeers, Twenty Years After and The Vicomte de Bragelonne), which cover d'Artagnan's career from his humble beginnings in Gascony to his death at Maastricht. Although Dumas knew that Sandras's version was heavily fictionalised, in the preface to The Three Musketeers he affected to believe that the memoirs were real, in order to make his novel more believable.
D'Artagnan is initially portrayed by Dumas as a hotheaded youth, who tries to engage the Comte de Rochefort and the three musketeers, Athos, Porthos, and Aramis in single combat. He quickly becomes friends with the musketeers, and has a series of adventures which put him at odds with Cardinal Richelieu, then First Minister of France. In the end, Richelieu is impressed by d'Artagnan, and makes him a lieutenant of the musketeers. This begins his long career of military service, as detailed in the sequels. 
D'Artagnan's role among the musketeers is one of leadership (his skills and brains impress the musketeers greatly), but he is also regarded as a sort of protégé given his youth and inexperience. Athos sees him not only as a best friend and fellow musketeer but nearly as a son. At the end of the series, his death at the siege of Maastricht is given an extra tragic twist – he is mortally wounded while reading the notice of his promotion to the highest military rank.
Some scholars believe aspects of D'Artagnan are drawn from the life and character of Dumas's mixed-race father, General Thomas-Alexandre Dumas. The incident when D'Artagnan challenges Porthos, Athos, and Aramis to duels on the same afternoon might be based on an incident in General Dumas's youth when he was insulted; and their subsequent friendship on General Dumas's youthful companionship with fellow soldiers in the Queen's Dragoons.
Charles de Batz de Castelmore d'Artagnan