Title 8, Section 240B of the Aliens and Nationality Act authorizes undocumented immigrants to voluntarily depart the United States without being barred from re-entry into the U.S. later. In contrast, leaving under a deportation order bars immigrants from re-entering the country for 5 years if they’re arrested at arrival into the U.S. and for 10 years if they’re arrested after arrival.
If no form of relief from removal is available to an undocumented immigrant, such as asylum or cancellation of removal proceedings, the immigrant may petition the Department of Homeland Security to be granted voluntary departure. But if DHS charges an immigrant as an aggravated felon and an immigration court confirms that charge, the immigrant is not eligible for voluntary departure and will be instead placed into removal proceedings.