The Old Rebbe explains in the 20th chapter of Tanya, that the first 2 of the 10 commandments which are:
1)I am your G-d
2)You should not serve anything but me
include all the 613 commandments. The first commandment includes all 248 positive mitzvoth (commandments) and the second includes all 365 negative mitzvoth. In order to understand this we first need to explain how G-d is one, and there's nothing but him. Even after he created the world, he did not change, and this is still the only thing which still really exists.