Nehemie Tampwo, 19, travelled to Telford the day after he allegedly stabbed Keelan Wilson in Wolverhampton and handed over his jacket, trainers and trousers to two individuals, Wolverhampton Crown Court was told.
But the items were never disposed of and ended up placing Tampwo, of Fern Grove, Bletchley, at the scene of the killing on May 29, 2018, according to prosecutor Mr Michael Duck QC.
Tampwo is one of four men accused of murdering Keelan as part of an ongoing feud between postcode gangs in the city.
Also on trial are three other 19-year-olds: Brian Sasa, Tyrique King and Zenay Pennant-Phillips.
Mr Duck told the court: "On the morning of [May] 30, he [Tampwo] was picked up in the Wolverhampton area and went to an address of two individuals in the Telford area.
"He provided an explanation that he wanted them to get rid of clothing given to him by a man who had been in a shooting.
"The items - the shoes, trainers and trousers - were not disposed of and instead were recovered. The trainers were examined and carried DNA from blood belonging to Keelan Wilson.
"It also carried DNA that was consistent with Mr Tampwo's. There was further blood and Tampwo's DNA which was found on his jacket."
He added: "There was a man on the morning after this murder trying to get rid of clothing that bore Keelan's blood and his own DNA.
"The prosecution say that the blood of Keelan Wilson was sprayed onto Mr Tampwo's clothing as he lunged a knife into him.
"Recognising the danger of the evidence, he wanted to rid his possession of the clothing by imposing it on two individuals to get rid of it."
More from the trial:
Keelan Wilson was getting into a taxi with a close associate on Strathfield Walk, near to his home in the Merry Hill area of the city, when he was allegedly attacked by the four defendants just before 11pm.
DNA evidence was recovered from the taxi, which Keelan had called for. Pennant-Phillips' fingerprints were on the rear offside door handle and Sasa's were on the nearside door, said Mr Duck.
'Horrendous and brutal'
Keelan and his associate were fixing a red Citroen on Strathfield Walk when they asked a man, named by the prosecutor as Mr Dooley, to call them a taxi as their efforts were proving unsuccessful to mend the vehicle.
Mr Dooley was walking with a woman called Miss Kearney.
She then saw "four late teenage males" enter Strathfield Walk from nearby Fareham Crescent wearing masks and face coverings, the court heard.
Mr Duck QC said: "What was noted by these two individuals, as they were situated close to the scene, was that Keelan Wilson was addressed by the first man as 'Keelan'.
"They then, as a group, ran towards where Keelan began to get into a taxi.
"The description provided by Miss Kearney was that [the attack] was carried out as a pack and in a horrendous and brutal manner.
"Keelan Wilson was attacked by a number of people while he was in about or about to get into that taxi.
"He was dragged to the ground and attacked for a period of about 20 seconds."
Keelan was stabbed more than 40 times by his attackers. His associate was unhurt but the taxi driver suffered minor injuries to his hands, which were not intended by the attackers, the court heard.
Mr Duck said the attack was "particularly tragic" as it was close to Keelan's address. Residents living in the vicinity would have "become aware quickly that a significant incident had taken place," he continued.
"Tragically, one of those who became aware to what had happened was Keelan's mother."
But she did not know it was Keelan lying on the ground until she recognised his clothing, Mr Duck added.
He said: "Keelan was declared dead in hospital at midnight but really he died where he lay in Strathfield Walk."
Sasa, of Long Ley, Heath Town; King, of Chelwood Gardens, Bilston; Pennant-Phillips, whose address cannot be published for legal reasons; and Tampwo, all deny a single charge of murder.
The trial continues.