Back then, they desperately struggled to feed their families.
Today, the collection of villages in Lalmonirhat district has a bustling marketplace, well-built homes with TVs inside and solar panels on the roofs, and thriving fields of a crop that pulled the community out of poverty: corn.
"Once I was landless and a rickshaw-puller," said Hasen Ali, 50, who spent more than two decades in the capital Dhaka scraping together an income before returning to his farm about five years ago.
After failing to grow both rice and wheat on his land, Ali tried corn, also called maize, and now earns about 200,000 taka ($2,360) each season, he said.
"I restored my property and bought some new land by selling maize," he said, adding he now sends his children to school.
Around Bangladesh's flood-prone north, farmers who can no longer grow their regular crops in the sandy soil after flood waters recede are turning to corn, which needs less water and brings in more money than most other staple crops here.
"No other crop is better and more profitable than maize cultivation in sandy land," said Romij Uddin, an agronomy professor at Bangladesh Agricultural University.
Maize is currently grown on more than 101,300 hectares in the northern region, which produces one-third of the national supply, according to government figures.
This fiscal year, which ends in June, farmers who a decade ago grew rice, tobacco and wheat have produced a record 1 million tonnes of the grain.
As the impacts of climate change drive more frequent and devastating floods in the north, agriculture expert Mahfuzul Haque said maize can help farmers adapt and prosper.
"Its root can go as deep as 6 feet (1.83 m) to absorb water... Paddy (rice) roots can go only down six inches in sandy soil," said Haque, senior scientific officer at the Bangladesh Agricultural Research Institute.
And the "huge demand" in Bangladesh for corn - used to make everything from poultry feed to sugar and paper - means it is more profitable than rice or wheat, he said.
Farmers can earn up to 850 taka for about 40 kg (88 pounds) of corn, about 15% more than they would earn growing rice and 40% more than wheat, said Rafiqul Islam, an agriculture officer in Hatibandha upazila, where Shaniazan is located.
Ataur Rahman, who teaches water resources engineering at Bangladesh University of Engineering and Technology, said riverbank erosion and flooding were becoming increasingly common problems in northern Bangladesh.
Rising global temperatures melt glaciers in the Hindu Kush mountains, causing more water to surge through major rivers downstream, which brings large amounts of sand, he explained.
"Heavy rainfall also creates floods in the monsoon season, and when the water recedes after flooding, the cultivable land is filled with sand," he added.
Farmer Abdul Latif Talukdar, 62, recalled the impact of the flooding in Shaniazan three decades ago, when the Teesta river overflowed and then changed course a few years later.
The villagers got their land back but could not grow anything on it, he said.
He and some other local farmers decided to experiment with maize, after consulting a local agriculture officer.
Following the first few attempts, which involved switching to higher-quality seeds and fertiliser, they produced a decent yield, he said.
"We were very happy to know that something was being cultivated in this sandy land and it would alleviate our poverty," Latif Talukdar said.
By 1997, having borrowed 300,000 taka from the Agricultural Development Bank, the farmers were cultivating about 400 kg of maize on one acre of land. A year later, the same plot yielded nearly four times as much, the farmer said. Today, Shaniazan's farmers produce so much corn they generate enough work to last the entire year, according to Abdus Sabur, who buys their harvest to sell to poultry feed companies.
Workers keep busy preparing fields, weeding, irrigating, collecting and drying the cultivated grain.
"No one is unemployed here," he said.
With training, financial assistance and incentives, the government is encouraging farmers all over Bangladesh to grow corn in a bid to move away from thirstier crops and meet demand, said MD Moniruzzaman, regional deputy director at the Department of Agriculture Extension.
Even with more than 3.8 million tonnes of maize being produced, the country will still need to import 2 million tonnes of corn this financial year, he added.
Agriculture Minister Mohammad Abdur Razzaque said the number of farmers starting to grow corn is "increasing day by day".
"If we can properly utilise sandy land for maize cultivation, then we would be able to get extra maize for export within five years," he said in a phone interview.
In Shaniazan, Abuja Mia, 50, remembers barely getting by as a day labourer until about seven years ago, when he used all his savings to lease a piece of land to grow maize.
Since then, he has bought three acres of land and grows corn on two of them, last year earning 140,000 taka.
Now he has a new motorcycle, a satellite TV connection and solar panel on his roof, and makes enough to send his son and daughter to school.
Before growing corn, "I had to struggle very hard to maintain my family. I couldn't even ensure three meals a day for them. My children's education was only a dream," he said.
"But maize cultivation has ended my struggle and made my dream come true."