The 21-year-old attacking midfielder has been linked with Milan for several months. Italian media put the fee at 35 million euros ($40m or £31.56m).
Paqueta is a left footer who appeared in 65 matches and scored 13 goals for Flamengo, where he started his career.
He made his debut for Brazil in September, in a 2-0 friendly victory over the United States.
“Lucas Paqueta will join his teammates at Milanello on January 7, 2019, when training sessions resume,” the club said in a statement.