Ming Jiang, 43, was in debt and being chased by creditors but his friend and fellow Chinese national Yang Liu, 36, could afford to gamble, the jury heard.
It is alleged Mr Jiang, of Beswick, dumped the suitcase in a remote Derbyshire lay-by and set it alight.
Mr Jiang denies murder. His trial at Minshull Street Crown Court continues.
Peter Wright QC, prosecuting, told the jury that Mr Jiang murdered Yang Lui as "a solution to his financial problems".
"He was a heavy gambler and, like many gamblers, lost more than he won," Mr Wright said.
"He dismembered the body - in all likelihood in his own flat - and then disposed of the body parts.
"He then set about assuming the dead man's identity, gaining access to his bank accounts and his personal effects and his apartment."
A total of Â£800 was taken from the dead man's bank account, the jury was told.
Mr Wright told the court Mr Liu's body was badly burned and had been extensively dismembered.
His head, both lower arms and both lower legs had been severed by "some bladed form of weapon" and removed, he said, adding: "They have never been found."
The jury heard the victim was last seen alive "in the vicinity" of the defendant's flat on 5 October 2016.
Using CCTV footage, detectives identified a silver Mercedes approaching and leaving the lay-by where the suitcase was dumped, just off the A628 at Tintwistle.
They discovered it was registered to Mr Jiang.
Distinctive tyre tracks also fitted the car, while traces of blood in the boot matched DNA from Mr Liu's body, the court was told.
The trial continues.

A late first-half goal from Quinn Saunders helped St Peter's into a 1-8 to 0-5 interval lead at Inniskeen.
The Derry school were boosted by an early second-half goal by Kevin Small but Rory O'Connor netted to make it 2-9 to 1-6 to St Peter's after 40 minutes.
A late rally by St Mary's yielded 1-3 without reply, Cormac Murphy scoring the goal, but it was not enough.
The Wexford school, who will contest the Hogan decider for the first time in their history, led by seven points, 2-10 to 1-6, with eight minutes remaining.
They will take on reigning champions St Brendan's of Killarney in the final on Saturday 1 April.
St Peter's were last in action in late January when they ended a 25-year wait for a Leinster senior crown, while St Mary's claimed their first MacRory Cup title by defeating 19-times winners St Colman's Newry on St Patrick's Day.
The semi-final was switched from Drogheda to the Monaghan venue.

The papers, showing drafts of the poems Unluckily for a Death and Into her Lying Down Head, were bought by Swansea University at an auction in New York.
They will go on public display at the university's Bay Campus library on International Dylan Thomas Day - 14 May.
The drafts include 25 pages in Thomas's minuscule handwriting.
Thomas's granddaughter Hannah Ellis said: "It is wonderful that Swansea University are putting so much energy and effort into new ways to study and research Dylan Thomas.
"Having these manuscripts in Britain, along with the notebook they acquired in 2014, will help people to see the meticulous craft that my grandfather put into his work, and allow them to understand that he was a significant 20th Century writer."
The papers show the poet revising imagery and word choice, and working out rhythmic structures, including diagrams of his tentative rhyme scheme and small drawings where he appears to be visualising his imagery.
Jeff Towns, owner of Dylan's Bookstore, said: "These papers reveal intimate and detailed records of the poet's creative process and will be invaluable to future generations of students and academics."
The manuscripts will be kept in the university's Richard Burton Archives, which already house the Dylan Thomas notebook.
Prof John Spurr, head of the university's College of Arts and Humanities, said: "These manuscripts offer a fascinating insight into the craft of one of our greatest 20th Century poets, and it is fitting that they will be kept in Dylan's home town, and be accessible to scholars and the general public."
A prolific gambler murdered his wealthy friend to solve debt problems then dismembered his body and stuffed it into a suitcase, a court has been told.
[NEXT_CONCEPT]
St Mary's Magherafelt lost 2-10 to 2-9 to St Peter's Wexford in the semi-finals of the Hogan Cup on Wednesday.
[NEXT_CONCEPT]
Working manuscripts of poems by Dylan Thomas are to go on public show for the first time.