Sometimes yes, but for the most part, no.
There are a few CPUs out there that used the same socket as a laptop, but 90% of them take a different type of socket.
Without knowing the model of the motherboard and the CPU there is no way to know for sure.
But, I would like to stress that if you bought a new motherboard and CPU, the CPU you just bought for the desktop likely is faster than the Laptop CPU.
Just because the clock speed on the laptop CPU is better, does not mean it will perform faster.
You have to take into account more specifications, such as Cache size, instruction set, manufacturing process, Bus speeds, and so on.