The bill also prohibits those using a car or motorbike from pulling their pets alongside them on a lead as they travel.
Anyone caught breaching the order faces a large fine or up to two years in prison - and having their names and photographs made public.
The measures were introduced to improve the country's animal protection laws.
The move on Tuesday is a landmark amendment to Taiwan's Animal Protection Act, and is the first of its kind in Asia.
In 2001, Taiwan passed legislation banning the sale of meat and fur of pets such as cats and dogs for what it described as "economic purposes".
Dog meat was once regularly consumed on the island, but the animal is now more likely to be considered a member of the family.
Last year, Taiwanese President Tsai Ing-wen adopted three retired guide dogs to live along with her two cats, Cookie and A-Tsai.
Ms Tsai, who is Taiwan's first female leader, attracted attention at the time with what was dubbed the country's new "first family".