Sanyal continued to actively protest against British colonial rule and was imprisoned seven times. He was elected to the Bengal Assembly and served as Chief Whip of the Indian National Congress of undivided Bengal, prior to the partition of the province. He was a vocal critic of the colonial government's policies during the Bengal Famine in 1943. In 1946, Sanyal was at the forefront of efforts to avoid the Partition of India. His suggestion of a loose federation was widely circulated and debated but was ultimately not adopted. When India was partitioned in 1947, he and Atulya Ghosh were able to convince the British to leave Maldah district in India (the area had a population that was evenly divided between Hindus and Muslims).