Lisa Bosia Mirra, a Socialist party MP in Ticino's parliament, was arrested on Thursday at an unguarded border point at Stabio along with a 53-year-old man from the canton of Bern, police said in a statement.
The man was driving a van with Bern licence plates that contained four African refugee minors, said the statement. Mirra, in another car, is thought to have met them at the border.
They were both arrested just before 9am on Thursday after entering Swiss territory.
Mirra was released later that day but police said in a second statement she is “still under in investigation for breach of the Foreigners Act, in particular aiding and abetting illegal entry”.
The man who was driving the van remains in custody.
According to news agencies Mirra is the founder of a refugee aid organization, Firdaus, and has been critical of Switzerland's treatment of refugee children trying to enter the country at the border with Italy at Chiasso.
She also works with SOS Ticino, a non-profit aimed at promoting social justice with a particular focus on migration.
Switzerland has been under fire in recent weeks for turning back migrants, including children, at the border if they do not claim asylum.
The authorities want to stop the country becoming a route for migrants in transit who wish to pass through Switzerland and claim asylum in Germany.
As a result, thousands of refugees have been turned back from Chiasso and have ended up camping out in the Italian city of Como.
Human rights groups including Amnesty International have expressed concern that child migrants wanting to reach family members already in Switzerland are being prevented from doing so.
And the Swiss Refugee Council recently said confusion at the border was making it difficult for refugees to claim asylum.
The Swiss border guards need to put more translators and child protection specialists in place to ensure those seeking to lodge an asylum request are able to do so, it said.