It’s best to paint the ceiling first, then attend to the walls. This allows you to cover up any paint residue from ceiling paint that has ended up on your walls.