Luther: "Moreover I am not the only one, or even the first, to say that faith alone justifies. Ambrose said it before me, and Augustine and many others" [LW 35:197].
Ambrose: "God chose that man should seek salvation by faith rather than by works, lest any should glory in his deeds and should thereby incur sin."
No, Luther doesn't use this Ambrose quote. But, I've been trying to track down the context of this Ambrose quote, as well as finding out which texts of Ambrose Luther had, and to what he meant. The LW edition, usually footnoting such obscurities, doesn't have a footnote for this point at LW 35:197. Luther was probably referring to Ambrose commenting on Romans 3:28.
I came across an interesting web page: Ambrose on Justification: A Study in the Catholicity of Lutheran Theology. The page is from a Lutheran. The author cites the Ambrose quote as "In ps. 43 enarr. 14; quoted in Dudden II, p. 627". "Dudden" is: F. Holmes Dudden, The Life and Times of St. Ambrose (Oxford: Clarendon Press, 1935), Vol. II.
"ps. 43 enarr. 14" is "Explanations of Twelve Psalms of David (Enarrationes in xii psalmos davidicos) LT: PL 14:963-1238; CSEL 64. The volume contains Ambrose's sermons on Psalm 1, 35-40, 43, 45, 47-48, and 61. The commentary/sermon on Psalm 43 is incomplete, because Ambrose died [source].
The same Ambrose quote is used by a pro-Roman Catholic site. After citing this same quote, the web page goes on to state:
Ambrose would also say: "Without the support of faith good works cannot stand" (On the Duties of the Clergy, 2, 7). That means that with the support of faith, good works can stand. If they can stand, then they certainly do not lead one to boast in himself, they do not lead one to sin. Ambrose has in mind a distinction here between "works" leading us to boast in God and "works" leading us to boast in ourselves. These latter works can never stand, with or without the support of faith.
Phillip Schaff explains the view of Ambrose on justification:
"As to justification, St. Ambrose ascribes the whole work to the Holy Spirit, Who seals us in our hearts, as we receive the outward sign in our bodies. Through the Holy Spirit we receive a share of the grace of adoption. Christ was perfect according to the fulness of His Majesty ; we are perfected by a continual progress in virtue."