Hi T
I think his parents may be Edmund Thornley and Elizabeth (Unknown) Chapel.
My reasoning is slightly tortured, but here goes!
In the 1841 census record for 80-year-old Edmund Thornley, there is an entry in the same household for 9-year-old Edmund, probably son of Edward and grandson of Edmund. So 9-year-old Edmund would have been 18 when James died in 1850, old enough to have been informant for the death.
Looking for this family in the 1851 census, I found them here:
https://familysearch.org/ark:/61903/1:1:SGK1-2BY
Note that the 9-year-old Edmund of 1841 is now 18-year-old Edward, suggesting that Edmund and Edward may be used interchangeably (ie Edward the father of Edmund could perhaps have been the informant on James' death certificate).
Edward (aged 48) is the right age to be a brother of James. The 1851 census states he was born in Wincle, Cheshire.
Unfortunately, the parish registers for Wincle only start in 1803, and Edward was probably born in 1802. And of course there would be no baptism for James Thornley who was born about 1798.
But what we do find are baptisms at Wincle for Betty (1804), Maria (1806) and Hannah (1808), all to parents Edmund and Betty:
https://familysearch.org/ark:/61903/1:1:F74T-ZXJ
https://familysearch.org/ark:/61903/1:1:F74T-DW5
https://familysearch.org/ark:/61903/1:1:F74T-X8Z
It seems the family then moved to Macclesfield, where William was baptised in 1810:
https://familysearch.org/ark:/61903/1:1:NPDX-PS9
Edmund Thornley and Elizabeth Chapel were married 10 June 1799:
https://familysearch.org/ark:/61903/1:1:F78Y-M57
Looking at the image, Elizabeth was a widow.
This marriage doesn't quite fit with James Thornley's age at death, which would make him born in 1798 or early 1799. But the age at death could easily be out by a year. Or perhaps Edmund was a widower, and James was born to a previous wife who died shortly after he was born. Or James could even be Elizabeth Chapel's son, who adopted his stepfather's surname. Further research is needed to answer these questions!
So while it's not a certainty, I think the circumstantial evidence suggests that Edmund Thornley and Elizabeth (Betty) Chapel (maiden name unknown) may be the parents of James (and Edward).