I had a more challenging situation than most of these answers considered: killing the Windows process by executable name (node.exe) was too broad so I had to find the WINPID by looking at the command line arguments. And unfortunately, the cygwin ps command doesn't show commandline arguments.
Another challenge was, although my process was spawned in cygwin, it created child processes that couldn't be seen in any ps except ps -W.
As an aside, you can find command line arguments for your visible cygwin processes by running this: grep -a "" /proc/*/cmdline | xargs -0 But that didn't help me in this situation because the process I wanted to kill wasn't visible by cygwin and therefore wasn't in that output.
Fortunately, Windows (10, at least) comes with a command line tool you can run in cygwin to get command name and argument information. Here's how: wmic process get ProcessID, Commandline /format:csv. The output looks something like this:
DESKTOP-ABC,E:\Windows\system32\lxss\wslhost.exe {xxx} x y z {xxx},180
DESKTOP-ABC,\??\E:\Windows\system32\conhost.exe 0x6,2295
DESKTOP-ABC,E:\Windows\system32\svchost.exe -k ClipboardSvcGroup -p -s abcdef,430
The last column of that output is the Windows process ID.
Other answers here claim you can /bin/kill -f $WINPID those, but when I tried, it reported this error: kill: illegal pid: $WINPID. I suspect this has something to do with cygwin not running in administrator mode?
Additional answers say to taskkill /pid $WINPID but when I tried, it reported this error: ERROR: Invalid query.
But this line from @244an's answer worked for me: taskkill /F /PID $WINPID /T.
I decided to post this as a separate answer because, in my humble opinion, the information that led up to this line is just as valuable as the answer itself: it provides a variety of ways to get the Windows PID from cygwin even if the process isn't visible in cygwin.
I also want to say it was challenging to figure out how to pass a variable into taskkill due to line return issues. wmic, being a Windows command, returns Windows line endings (\r\n). Cygwin assumes its commands are going to receive you unix endings (\n). Due to this, taskkill output some very unhelpful error messages. The tr in this pipeline is how I resolved that:
wmic process get ProcessID, Commandline /format:csv | tr -d '\r' | grep -- 'search term' | awk -F, '{ system("taskkill /F /PID " $NF " /T") }'
It removes every '\r' from the output. This awk says, the field separator for every column is a comma. The awk script says, "for every line grep finds, run taskkill on the last column (i.e., $NF) of the csv output.