Jer. and Neh. in their writings mention that it is unlawful to carry a burden on the Sabbath. However, this was an extreme since the man was not carrying is mat to sell it. But, while Neh. mentions the burden related to merchants, Jer. does not.
Thus says the LORD: Take care for the sake of your lives, and do not bear a burden on the Sabbath day or bring it in by the gates of Jerusalem. 22 And do not carry a burden out of your houses on the Sabbath or do any work, but keep the Sabbath day holy, as I commanded your fathers.
(Jer. 17:21–22, ESV)
As soon as it began to grow dark at the gates of Jerusalem before the Sabbath, I commanded that the doors should be shut and gave orders that they should not be opened until after the Sabbath. And I stationed some of my servants at the gates, that no load might be brought in on the Sabbath day.
(Neh. 13:19, ESV)
By Old Testament standards, it is not clear the healed man was contravening the law, since he did not normally carry mats around for a living; according to the ‘tradition of the elders’ the man was breaking the law, since he was contravening one of the prohibited thirty-nine categories of work to which the law was understood to refer. It is not yet Jesus who is charged with breaking the law (e.g. for healing the man on a Sabbath, as in Mk. 3:1–6), though that will come (v. 18): for the moment, it is the healed man who must face the indignation of the Jews—here referring to the religious authorities in Jerusalem (cf. notes on 1:19).
Carson, D. A. (1991). The Gospel according to John (pp. 244–245). Leicester, England; Grand Rapids, MI: Inter-Varsity Press; W.B. Eerdmans.