Unfortunately, there isn't much that's known about Shartan, but multiple sources read that he was a slave of the Imperium, and he escaped with his fellow elves. It's mentioned in the 'Dark Moon' codex:
"They say that Shartan's followers stole whatever they could find to make weapons. They fought with knives of sharpened stone and glass, and with bows made from broken barrels or firewood. This bow was ox horn, made in secret over the course of months by a slave who worked in the slaughterhouses of Minrathous.
"The slave's name has been lost to history, and the verses that spoke of his deeds, stricken from the chant, but the weapon endures."
There is a little more that's revealed about Shartan's life during his war against the Imperium. According to the codex 'Glandivalis':
"It is heresy today to speak of Shartan, an elven slave that rose up against his Tevinter masters to help Andraste's barbarian invasion.
"It seems most people would prefer to believe that Andraste crossed the Waking Sea with little more than a basket of flowers and songs of peace and harmony. The truth is that she came with a horde of warriors at her back, and that without a rebellion occurring behind the enemy lines it's very possible that the holy invasion could have been foiled.
"Shartan was a slave who became a fabled warrior and later a devotee of Andraste herself, and we know this because the Canticle of Shartan spoke of their meeting on the Valarian Fields. Andraste gave him a mystic blade that he called Glandivalis (translation unknown) and he even fought at Maferath's side. But now the Canticle is one of the Dissonant Verses, and has been ever since the Exalted March of the Dales.
"It seems we don't wish to speak of elven heroes or the role they played in Andraste's war any more than we wish to speak of barbarians or the bloody death toll that accompanied the war. With each passing age, heroes like Shartan become more of a fable, but some of us will always know the truth."