One result of the British vote to leave the EU has been a revival of calls for Scotland to leave the U.K. Doing so is considerably more attractive if combined with EU membership. That raises the question of whether, if Brexit were followed by Scottish secession, the EU would be willing to let the Scots in.One argument in favor, from the standpoint of the EU, is that encouraging Scottish secession is a way of punishing the U.K. for leaving and so deterring other countries from doing so. One argument against is that allowing a breakaway region to join sets a precedent that some current EU members, most obviously Spain, might be unhappy with. The Scots could, of course, argue that the precedent would only be relevant to the case of breakaway regions from non-member states. The Spanish might or might not be convinced.
Source