The correct option is A When he was in a sullen mood, he gave away the beautiful porcelain that his uncle had graciously given him.
Since the sullen mood is an adverb for the action of giving away, the clause "when...mood" should be placed nearest to "he gave away..." without changing the meaning. Hence Option A is correct. The rest of the options do not place the qualifying clauses together, hence incorrect.